start building dashboard
This commit is contained in:
@@ -30,7 +30,7 @@ export function send_json_error(res: FastifyReply, error_code: ErrorCode) {
|
||||
};
|
||||
}
|
||||
|
||||
export function send_html_error(res: FastifyReply, error_code: ErrorCode, render_html: (code: ErrorCode, error: ErrorInfo) => string) {
|
||||
export function send_html_error(res: FastifyReply, error_code: ErrorCode, render_html: (code: ErrorCode, error: ErrorInfo) => string | Promise<string>) {
|
||||
const error = errors[error_code];
|
||||
res.status(error.status);
|
||||
res.header('content-type', 'text/html; charset=utf-8');
|
||||
|
||||
Reference in New Issue
Block a user