whole structure done based on sequelize reccommendation

This commit is contained in:
Arjun Patel
2019-01-04 15:32:36 -08:00
parent 5493c4cef7
commit 2c9aed9952
7 changed files with 112 additions and 40 deletions
+19
View File
@@ -0,0 +1,19 @@
module.exports = function(app) {
const donors = require('../controller/donors.controller.js');
// Create a new Donor
app.post('/api/donors', donors.create);
// Retrieve all Donor
app.get('/api/donors', donors.findAll);
// Retrieve a single Donor by Id
app.get('/api/donors/:DonorId', donors.findById);
// Update a Donor with Id
app.put('/api/donors/:DonorId', donors.update);
// Delete a Donor with Id
app.delete('/api/donors/:DonorId', donors.delete);
}