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

22 lines
347 B
JavaScript

const db = require('../../data/dbConfig');
module.exports = {
getCities,
getCitiesByCountry
// getCity,
};
function getCities() {
return db('cities')
}
function getCitiesByCountry(country_id) {
return db('cities')
.where({ country_id })
}
// function getCity(name) {
// return db('cities')
// .where({ name })
// .first()
// }