Wrap location in data to conform with current API
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -133,8 +133,8 @@ export async function createNextRouter(
|
||||
res.status(201).json(output);
|
||||
})
|
||||
.get('/locations', async (_req, res) => {
|
||||
const output = await locationService.listLocations();
|
||||
res.status(200).json(output);
|
||||
const locations = await locationService.listLocations();
|
||||
res.status(200).json(locations.map(l => ({ data: l })));
|
||||
})
|
||||
|
||||
.get('/locations/:id', async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user