From ce70dcd199bc305709bf775439455257c64aa14b Mon Sep 17 00:00:00 2001 From: johnniang Date: Thu, 21 Mar 2019 10:46:55 +0800 Subject: [PATCH] Complete user api --- src/api/user.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/api/user.js diff --git a/src/api/user.js b/src/api/user.js new file mode 100644 index 00000000..464fbe1a --- /dev/null +++ b/src/api/user.js @@ -0,0 +1,22 @@ +import service from '@/utils/service' + +const baseUrl = '/admin/api/users' + +const userApi = {} + +userApi.getProfile = () => { + return service({ + url: `${baseUrl}/profile`, + method: 'get' + }) +} + +userApi.updateProfile = updatedUserProfile => { + return service({ + url: `${baseUrl}/profile`, + method: 'put', + data: updatedUserProfile + }) +} + +export default userApi