mirror of
https://github.com/franjsco/trackmyd-api
synced 2025-06-06 00:29:14 +02:00
add view single device routes/controller
This commit is contained in:
@ -10,4 +10,15 @@ function index(req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
function view(req, res) {
|
||||
Device.findById(req.params.deviceId)
|
||||
.then((device) => {
|
||||
res.json(device);
|
||||
})
|
||||
.catch((err) => {
|
||||
res.send(err);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.index = index;
|
||||
module.exports.view = view;
|
||||
|
Reference in New Issue
Block a user