feat: fix authentication

This commit is contained in:
mrjvs
2026-08-08 20:55:56 +02:00
parent 69d133ab85
commit 0e174905f0
16 changed files with 154 additions and 116 deletions

21
shared/api-types.ts Normal file
View 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>;