mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
admin(ui): add blank 'create' views
This commit is contained in:
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);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user