2022-08-18 11:41:19 +00:00
|
|
|
/* global axios */
|
2022-07-27 06:54:43 +00:00
|
|
|
import ApiClient from '../ApiClient';
|
|
|
|
|
|
|
|
class PortalsAPI extends ApiClient {
|
|
|
|
constructor() {
|
|
|
|
super('portals', { accountScoped: true });
|
|
|
|
}
|
2022-08-18 11:41:19 +00:00
|
|
|
|
2022-10-21 20:43:15 +00:00
|
|
|
getPortal({ portalSlug, locale }) {
|
|
|
|
return axios.get(`${this.url}/${portalSlug}?locale=${locale}`);
|
|
|
|
}
|
|
|
|
|
2022-09-01 16:49:30 +00:00
|
|
|
updatePortal({ portalSlug, portalObj }) {
|
|
|
|
return axios.patch(`${this.url}/${portalSlug}`, portalObj);
|
2022-08-18 11:41:19 +00:00
|
|
|
}
|
2022-09-01 07:57:08 +00:00
|
|
|
|
|
|
|
deletePortal(portalSlug) {
|
|
|
|
return axios.delete(`${this.url}/${portalSlug}`);
|
|
|
|
}
|
2022-07-27 06:54:43 +00:00
|
|
|
}
|
|
|
|
|
2022-08-04 09:41:29 +00:00
|
|
|
export default PortalsAPI;
|