UNPKG

hcc-imageright-apis

Version:

imageright APIs

20 lines (19 loc) 787 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.changeUserPassword = changeUserPassword; exports.getCurrentUser = getCurrentUser; exports.getCurrentUserData = getCurrentUserData; exports.getUserData = getUserData; // Users function changeUserPassword(api, content) { return api.post('api/users/changepassword', content).then((res) => Promise.resolve(res.data)); } function getCurrentUser(api) { return api.get('api/users/currentuser').then((res) => Promise.resolve(res.data)); } function getCurrentUserData(api) { return api.get('api/users/currentuser/userdata').then((res) => Promise.resolve(res.data)); } function getUserData(api, userId) { return api.get(`api/users/${userId}/userdata`).then((res) => Promise.resolve(res.data)); }