Improve error messages with id
This commit is contained in:
16
api/models/possibleDateModel.js
Normal file
16
api/models/possibleDateModel.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const db = require('../../data/db');
|
||||
|
||||
module.exports = {
|
||||
addPossibleDate,
|
||||
deletePossibleDate,
|
||||
};
|
||||
|
||||
function addPossibleDate(data) {
|
||||
return db('possible_date')
|
||||
.insert(data)
|
||||
.returning(['id', 'meeting_id', 'possible_date']);
|
||||
}
|
||||
|
||||
function deletePossibleDate(id) {
|
||||
return db('possible_date').where({ id }).del();
|
||||
}
|
||||
Reference in New Issue
Block a user