mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-08 08:56:39 -05:00
feat: fix authentication
This commit is contained in:
21
shared/api-types.ts
Normal file
21
shared/api-types.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export interface GetApiAuthMe {
|
||||
pid: number;
|
||||
username: string;
|
||||
mii: {
|
||||
imageUrl: string;
|
||||
name: string;
|
||||
} | null;
|
||||
}
|
||||
|
||||
export type ApiAuthLogin = {
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
};
|
||||
|
||||
export const LoginSchema = z.object({
|
||||
username: z.string(),
|
||||
password: z.string()
|
||||
});
|
||||
export type ApiAuthLoginRequest = z.infer<typeof LoginSchema>;
|
||||
Reference in New Issue
Block a user