diff --git a/spx-gui/src/apis/common/client.ts b/spx-gui/src/apis/common/client.ts index bd75bfc3..9770dc96 100644 --- a/spx-gui/src/apis/common/client.ts +++ b/spx-gui/src/apis/common/client.ts @@ -68,6 +68,7 @@ export class Client { } throw new ApiException(body.code, body.msg) } + if (resp.status === 204) return null return resp.json() } diff --git a/spx-gui/src/apis/user.ts b/spx-gui/src/apis/user.ts index 48d75903..96b7821a 100644 --- a/spx-gui/src/apis/user.ts +++ b/spx-gui/src/apis/user.ts @@ -49,7 +49,7 @@ export type ListUserParams = PaginationParams & { } export async function listUsers(params: ListUserParams) { - const { total, data } = await (client.get('/users/list', { params }) as Promise>) + const { total, data } = await (client.get('/users/list', params) as Promise>) return { total, data: data.map(__adaptUser)