backend/api/models/possibleDateModel.js

17 lines
318 B
JavaScript

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();
}