2022-01-20 10:40:53 +01:00
|
|
|
export const buildRouteEndpoints = API => ({
|
|
|
|
/**
|
|
|
|
* Fetches available routes for the client app.
|
|
|
|
*/
|
|
|
|
fetchClientAppRoutes: async () => {
|
|
|
|
return await API.get({
|
|
|
|
url: `/api/routing/client`,
|
|
|
|
})
|
|
|
|
},
|
2022-01-20 19:42:30 +01:00
|
|
|
|
2022-01-25 17:54:55 +01:00
|
|
|
/**
|
|
|
|
* Fetches all routes for the current app.
|
|
|
|
*/
|
2022-01-20 19:42:30 +01:00
|
|
|
fetchAppRoutes: async () => {
|
|
|
|
return await API.get({
|
|
|
|
url: "/api/routing",
|
|
|
|
})
|
|
|
|
},
|
2022-01-20 10:40:53 +01:00
|
|
|
})
|