fix: forgot some changes
This commit is contained in:
parent
165bfd0497
commit
0590295e6b
|
@ -1,13 +1,3 @@
|
||||||
async function hey(req, res) {
|
|
||||||
try {
|
|
||||||
const query_result = "Hey you!";
|
|
||||||
res.send(query_result);
|
|
||||||
} catch (error) {
|
|
||||||
console.debug("Error at hey controller");
|
|
||||||
res.status(500).json({ error: error.message });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function helloWorld(req, res) {
|
async function helloWorld(req, res) {
|
||||||
try {
|
try {
|
||||||
const query_result = "Hello there!";
|
const query_result = "Hello there!";
|
||||||
|
@ -18,4 +8,4 @@ async function helloWorld(req, res) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { helloWorld, hey };
|
module.exports = { helloWorld };
|
||||||
|
|
|
@ -8,9 +8,4 @@ router.get('/', (res, req) => {
|
||||||
controller.helloWorld(res, req);
|
controller.helloWorld(res, req);
|
||||||
});
|
});
|
||||||
|
|
||||||
router.get('/hey', (res, req) => {
|
|
||||||
console.debug("Triggered hey");
|
|
||||||
controller.hey(res, req);
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
Loading…
Reference in a new issue