feat: 新增数据库

This commit is contained in:
2026-04-25 21:52:18 +08:00
parent 223845b0ed
commit abd1b03529
23 changed files with 1890 additions and 97 deletions
+4 -1
View File
@@ -3,7 +3,8 @@ import {
clearNewApiAuthCookies,
createErrorResponse,
createSuccessResponse,
newApiAuthedFetch
newApiAuthedFetch,
upsertUserSnapshot
} from "~~/server/utils";
interface INewApiWrappedUserResponse {
@@ -40,6 +41,8 @@ export default defineEventHandler(async (event) => {
return createErrorResponse(401, normalized.message);
}
upsertUserSnapshot(normalized.user).catch(() => {});
return createSuccessResponse<IUserMeData>(
normalized.user,
normalized.message