Migrate project from typing_practiceweb
This commit is contained in:
24
src/types/auth.ts
Normal file
24
src/types/auth.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
// src/types/auth.ts
|
||||
export interface LoginFormValues {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
export interface RegisterFormValues extends LoginFormValues {
|
||||
email?: string;
|
||||
fullname: string;
|
||||
confirmPassword: string;
|
||||
}
|
||||
export interface LoginResponse {
|
||||
token: string;
|
||||
user: {
|
||||
_id: string;
|
||||
username: string;
|
||||
email: string;
|
||||
fullname: string;
|
||||
isAdmin: boolean;
|
||||
};
|
||||
}
|
||||
export interface ErrorResponse {
|
||||
message: string;
|
||||
code?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user