added profile stuffi
This commit is contained in:
@@ -61,3 +61,5 @@ export function fetchProfile(jwt: any) {
|
||||
Vue.$log.debug('JWT: ' + jwt);
|
||||
return axios.get(`${API_URL}/v1/user/profile`, { headers: { Authorization: `Bearer ${jwt}` } });
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
// @ts-ignore
|
||||
import Repository from './Repository';
|
||||
import Vue from 'vue/types/vue';
|
||||
import axios from 'axios';
|
||||
import {dictEmptyValToNull} from '@/utils';
|
||||
|
||||
const resource = '/user';
|
||||
|
||||
@@ -17,4 +20,8 @@ export default {
|
||||
createUser(userData: any) {
|
||||
return Repository.post(`${resource}`, userData);
|
||||
},
|
||||
|
||||
updateProfile(userData: any) {
|
||||
return Repository.put(`${resource}/profile`, dictEmptyValToNull(userData));
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user