mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
/api/auth/changePassword, /api/user, /api/user/changeNickname Endpoint 구현
This commit is contained in:
1 parent
bd1e9cf54f
commit
299787537e
11 files changed
+125
-2
No files matched your search
@@ -1,5 +1,11 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const changePasswordRequest = z.object({
|
||||
oldPassword: z.string().trim().nonempty(),
|
||||
newPassword: z.string().trim().nonempty(),
|
||||
});
|
||||
export type ChangePasswordRequest = z.infer<typeof changePasswordRequest>;
|
||||
|
||||
export const loginRequest = z.object({
|
||||
email: z.string().email().nonempty(),
|
||||
password: z.string().trim().nonempty(),
|
||||
|
||||
@@ -4,3 +4,4 @@ export * from "./directory";
|
||||
export * from "./file";
|
||||
export * from "./hsk";
|
||||
export * from "./mek";
|
||||
export * from "./user";
|
||||
@@ -0,0 +1,12 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const userInfoResponse = z.object({
|
||||
email: z.string().email().nonempty(),
|
||||
nickname: z.string().nonempty(),
|
||||
});
|
||||
export type UserInfoResponse = z.infer<typeof userInfoResponse>;
|
||||
|
||||
export const changeNicknameRequest = z.object({
|
||||
newNickname: z.string().min(2).max(8),
|
||||
});
|
||||
export type ChangeNicknameRequest = z.infer<typeof changeNicknameRequest>;
|
||||
Reference in new issue
Block a user