Add nest endpoints and pages
This commit is contained in:
parent
359769244f
commit
6c85be72fa
12 changed files with 473 additions and 10 deletions
12
resources/scripts/api/admin/nests/createNest.ts
Normal file
12
resources/scripts/api/admin/nests/createNest.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import http from '@/api/http';
|
||||
import { Nest } from '@/api/admin/nests/getNests';
|
||||
|
||||
export default (name: string, description?: string): Promise<Nest> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.post('/api/application/nests', {
|
||||
name, description,
|
||||
})
|
||||
.then(({ data }) => resolve(data.attributes))
|
||||
.catch(reject);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue