Initial commit for open-source version

This commit is contained in:
jiangrui
2024-12-17 11:30:59 +08:00
commit 42c07ed34c
57 changed files with 10559 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { Response, NextFunction } from "express";
import { Logger } from "../utils/logger";
export default function handleError(
res: Response,
error: any,
message: string,
next: NextFunction
) {
Logger.error(message, error);
next(error || { success: false, message });
}