admin(ui): add blank 'create' views
This commit is contained in:
parent
e7021dfc39
commit
d81aef68b5
12 changed files with 201 additions and 16 deletions
12
resources/scripts/api/admin/locations/createLocation.ts
Normal file
12
resources/scripts/api/admin/locations/createLocation.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import http from '@/api/http';
|
||||
import { Location } from '@/api/admin/locations/getLocations';
|
||||
|
||||
export default (short: string, long?: string): Promise<Location> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.post('/api/application/locations', {
|
||||
short, long,
|
||||
})
|
||||
.then(({ data }) => resolve(data.attributes))
|
||||
.catch(reject);
|
||||
});
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
import { Role } from '@/api/admin/roles/getRoles';
|
||||
import http from '@/api/http';
|
||||
import { Role } from '@/api/admin/roles/getRoles';
|
||||
|
||||
export default (name: string, description?: string): Promise<Role> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue