mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
💻 | Working on API
This commit is contained in:
@@ -13,13 +13,6 @@ export default class LocationsController {
|
||||
})
|
||||
}
|
||||
|
||||
public async history ({ response }: HttpContextContract) {
|
||||
const locations = await Location.query().orderBy('since', 'desc')
|
||||
return response.status(200).send({
|
||||
locations
|
||||
})
|
||||
}
|
||||
|
||||
public async add ({ request, response }: HttpContextContract) {
|
||||
const data = await request.validate(LocationValidator)
|
||||
await Location.create(data)
|
||||
|
||||
Reference in New Issue
Block a user