mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-03-31 09:11:45 +08:00
24 lines
449 B
TypeScript
24 lines
449 B
TypeScript
export type AuthError = 'Not authenticated';
|
|
|
|
export type LoginError = 'Password error' | 'User not found';
|
|
|
|
export type ApiErrorMessage = AuthError | LoginError;
|
|
|
|
/**
|
|
* 401 Token 过期
|
|
* 404 Not Found
|
|
* 406 Not Acceptable
|
|
* 500 Internal Server Error
|
|
*/
|
|
export type StatusCode = 401 | 404 | 406 | 500;
|
|
|
|
export type ApiError = {
|
|
status: StatusCode;
|
|
detail: ApiErrorMessage;
|
|
msg: string;
|
|
};
|
|
|
|
export interface ApiSuccess {
|
|
msg: string;
|
|
}
|