dijkstra-backend/api/models/countriesModel.js

16 lines
243 B
JavaScript
Raw Normal View History

2020-02-08 18:59:51 +00:00
const db = require('../../data/dbConfig');
2020-02-07 16:55:43 +00:00
module.exports = {
getCountries,
getCountryByName,
};
function getCountries() {
return db('countries')
}
function getCountryByName(name) {
return db('countries')
.where({ name })
.first()
}