tmp
This commit is contained in:
parent
df6f5c3a09
commit
e7aeeace26
18 changed files with 614 additions and 65 deletions
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);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue