mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-12 19:33:45 +02:00
tmp
This commit is contained in:
15
resources/scripts/api/admin/roles/getRoles.ts
Normal file
15
resources/scripts/api/admin/roles/getRoles.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user