feat: increase support for multiple time zones

This commit is contained in:
zhongming4762
2025-10-22 19:52:01 +08:00
parent 03ce030e7c
commit 0a8339a405
32 changed files with 577 additions and 9 deletions

View File

@@ -0,0 +1,14 @@
import { eventHandler, readBody } from 'h3';
import { verifyAccessToken } from '~/utils/jwt-utils';
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
import { setTimezone } from '~/utils/timezone-utils';
export default eventHandler(async (event) => {
const userinfo = verifyAccessToken(event);
if (!userinfo) {
return unAuthorizedResponse(event);
}
const { timezone } = await readBody(event);
setTimezone(timezone);
return useResponseSuccess();
});