Skip to content

Commit

Permalink
feat: Added get user endpoint to axios client
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-merlin committed Feb 14, 2024
1 parent 338040e commit 9706326
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/lib/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ export const getAllUsers = async (): Promise<AxiosResponse> => {
return await request('GET', '/v1/users/all')
}

export const getUser = async (username: string): Promise<AxiosResponse> => {
return await request('GET', `/v1/users/user?username=${username}`)
}

export const addUser = async (user: unknown): Promise<AxiosResponse> => {
return await request('POST', '/v1/users/user', JSON.stringify(user))
}
Expand Down

0 comments on commit 9706326

Please sign in to comment.