Refactor the backend

This commit is contained in:
jiangrui
2025-03-11 00:06:10 +08:00
parent a78ea7e5bd
commit 615149c83f
22 changed files with 338 additions and 84 deletions

View File

@@ -12,10 +12,10 @@ export class ApiResponse<T> {
}
static success<T>(data?: T, message = "操作成功"): ApiResponse<T> {
return new ApiResponse(true, 200, data, message);
return new ApiResponse(true, 0, data, message);
}
static error(message: string, code = 500): ApiResponse<null> {
static error(message: string, code = 10000): ApiResponse<null> {
return new ApiResponse(false, code, null, message);
}
}