start building dashboard

This commit is contained in:
2023-08-04 17:39:04 -07:00
parent 811629eda9
commit 7c205632cb
18 changed files with 389 additions and 43 deletions

View File

@@ -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');