dijkstra-backend/models/countriesModel.js

16 lines
240 B
JavaScript
Raw Normal View History

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