mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
backend: drop and modify
This commit is contained in:
parent
17a929956c
commit
7513f79b93
7 changed files with 81 additions and 2 deletions
|
@ -101,3 +101,14 @@ export const getRouteList = ({
|
|||
export const checkOSRMService = (bounds: LatLngLiteral[]): Promise<boolean> => (
|
||||
CLIENT && CLIENT.OSRM_URL && axios.get(CLIENT.OSRM_TEST_URL(bounds)).then(() => true).catch(() => false)
|
||||
);
|
||||
|
||||
export const dropRoute = ({ address, id, token }: { address: string, id: string, token: string }): AxiosPromise<any> => (
|
||||
axios.delete(API.DROP_ROUTE, { data: { address: '1123123123123', id, token } })
|
||||
);
|
||||
|
||||
export const modifyRoute = (
|
||||
{ address, id, token, title, is_public }:
|
||||
{ address: string, id: string, token: string, title: string, is_public: boolean }
|
||||
): AxiosPromise<any> => (
|
||||
axios.patch(API.DROP_ROUTE, { address, id, token, title, is_public })
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue