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