import { api } from './client' export const listLocations = (parent_id?: number) => api.get('/locations', { params: parent_id != null ? { parent_id } : {} }).then(r => r.data) export const searchLocations = (q: string) => api.get('/locations/search', { params: { q } }).then(r => r.data)