Skip to content

Commit

Permalink
✨ : add api service for users
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubuisson committed Apr 9, 2020
1 parent 8e533a7 commit 0194fb8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/client/app/shared/api/users-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import axios from 'axios';

export const getUsers = async () => {
const resp = await axios.get('/api/users');
return resp.data;
};

export const updateUser = async (user) => axios.put(`/api/users/${user.id}`, user);

0 comments on commit 0194fb8

Please sign in to comment.