Skip to content

Commit

Permalink
feat: Bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
nuintun committed Jun 20, 2024
1 parent 2e31a65 commit 280accc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/js/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ export type Body = Query | BodyInit | null;

export type Query = Record<string | number, any>;

export interface Options extends Omit<RequestInit, 'body'> {
body?: Body;
query?: Query;
baseURL?: string;
onUnauthorized?: () => void;
onMessage?: (message: string) => void;
}

export interface RequestResult<R = unknown> {
payload: R;
msg: string;
Expand All @@ -28,6 +20,14 @@ export interface RequestError<R = unknown> extends Error {
response?: R;
}

export interface Options extends Omit<RequestInit, 'body'> {
body?: Body;
query?: Query;
baseURL?: string;
onUnauthorized?: () => void;
onMessage?: (message: string) => void;
}

const STATUS_TEXT: Record<number, string> = {
200: '操作成功',
401: '未经授权',
Expand Down

0 comments on commit 280accc

Please sign in to comment.