-
-
Save catalinpit/c865810e9a5c4d2261e1fa3133bd143b to your computer and use it in GitHub Desktop.
src/routes/routes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const controller = require('../controllers/controllers'); | |
async function routes(app, opts) { | |
app.route({ | |
method: 'GET', | |
url: '/job/applications', | |
handler: controller.getAllApplications | |
}); | |
app.route({ | |
method: 'GET', | |
url: '/job/applications/:id', | |
handler: controller.getApplication | |
}); | |
app.route({ | |
method: 'GET', | |
url: '/job/applications/filter', | |
handler: controller.filterApplications | |
}); | |
app.route({ | |
method: 'POST', | |
url: '/job/applications', | |
handler: controller.addApplication | |
}); | |
app.route({ | |
method: 'PATCH', | |
url: '/job/applications/:id', | |
handler: controller.updateApplication | |
}); | |
}; | |
module.exports = routes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment