UNPKG

@defra/wls-eps-web-service

Version:

The web service for wildlife licencing of European Protected Species

15 lines (12 loc) 581 B
import { apiRequestsWrapper } from './api-requests.js' import { API } from '@defra/wls-connectors-lib' export const OTHER = { authorities: async () => apiRequestsWrapper(async () => API.get('/authorities'), 'Error fetching authorities', 500), designatedSites: async () => apiRequestsWrapper(async () => API.get('/designated-sites'), 'Error fetching designated sites', 500), /** * The hidden reset handler * @returns {Promise<*|undefined>} */ reset: async username => apiRequestsWrapper(async () => API.post('/reset', { username }), 'Error resetting', 500) }