mirror of
https://github.com/Aviortheking/IMIE_CQ.git
synced 2025-06-07 16:29:54 +00:00
Faite :D
This commit is contained in:
parent
babed07d26
commit
1c95f11c87
@ -9,10 +9,11 @@ module.exports = class ApiController {
|
||||
}
|
||||
|
||||
single(req, res) {
|
||||
if (req.query.id === '') {
|
||||
const entity = this.db.getByID(req.query.id)
|
||||
if (req.query.id === '' || !entity) {
|
||||
res.send({ message: 'Identifiant incorrect' })
|
||||
} else {
|
||||
res.send(this.db.getByID(req.query.id))
|
||||
res.send(entity)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user