dijkstra-backend/models/countriesModel.js
2020-02-07 17:55:43 +01:00

16 lines
240 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()
}