misc_pterodactyl-panel/resources/scripts/api/admin/roles/getRoles.ts
Matthew Penner e7aeeace26 tmp
2020-12-27 22:02:30 -07:00

15 lines
334 B
TypeScript

import http from '@/api/http';
export interface Role {
id: number,
name: string,
description: string|null,
}
export default (): Promise<Role[]> => {
return new Promise((resolve, reject) => {
http.get('/admin/roles')
.then(({ data }) => resolve(data || []))
.catch(reject);
});
};