2020-03-26 04:58:37 +00:00
|
|
|
import { PanelPermissions } from '@/state/permissions';
|
2019-11-04 01:37:06 +00:00
|
|
|
import http from '@/api/http';
|
|
|
|
|
2020-03-26 04:58:37 +00:00
|
|
|
export default (): Promise<PanelPermissions> => {
|
2019-11-04 01:37:06 +00:00
|
|
|
return new Promise((resolve, reject) => {
|
2020-07-05 01:30:50 +00:00
|
|
|
http.get('/api/client/permissions')
|
2019-11-04 01:37:06 +00:00
|
|
|
.then(({ data }) => resolve(data.attributes.permissions))
|
|
|
|
.catch(reject);
|
|
|
|
});
|
|
|
|
};
|