Skip to content

Commit

Permalink
fix api calling (goplus#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
nighca authored Oct 15, 2024
1 parent a9410cb commit caa3fbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions spx-gui/src/apis/common/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export class Client {
}
throw new ApiException(body.code, body.msg)
}
if (resp.status === 204) return null
return resp.json()
}

Expand Down
2 changes: 1 addition & 1 deletion spx-gui/src/apis/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ByPage<User>>)
const { total, data } = await (client.get('/users/list', params) as Promise<ByPage<User>>)
return {
total,
data: data.map(__adaptUser)
Expand Down

0 comments on commit caa3fbe

Please sign in to comment.