Complete user api

pull/3445/head
johnniang 2019-03-21 10:46:55 +08:00
parent 8cdba1b824
commit ce70dcd199
1 changed files with 22 additions and 0 deletions

22
src/api/user.js Normal file
View File

@ -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