cluedin-widget
Version:
This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.
21 lines (16 loc) • 760 B
JavaScript
import { apiRequest, frontApiRequest } from '../helpers/request';
export function getUsers() {
return apiRequest('GET', 'api/account/accounts');
}
export function getPotentialUsers() {
return apiRequest('GET', 'api/entity/domainusers').then((resp) => (resp.body));
}
export function getCurrentUser() {
return apiRequest('GET', 'api/account/user').then((resp) => (resp.body));
}
export function addWidthConfigToUserProfile(userId, widgetToAdd) {
return frontApiRequest('POST', `api/userprofile/widget/${userId}`, widgetToAdd).then((resp) => (resp.body));
};
export function removeWidgetToUserProfile(userId, widgetToRemove) {
return frontApiRequest('POST', `api/userprofile/removewidget/${userId}`, widgetToRemove).then((resp) => (resp.body));
};