dijkstra-backend/api/models/countriesModel.js
2020-02-08 19:59:51 +01:00

16 lines
243 B
JavaScript

const db = require('../../data/dbConfig');
module.exports = {
getCountries,
getCountryByName,
};
function getCountries() {
return db('countries')
}
function getCountryByName(name) {
return db('countries')
.where({ name })
.first()
}