misc_pterodactyl-panel/resources/scripts/api/getSystemPermissions.ts

11 lines
337 B
TypeScript
Raw Normal View History

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