dijkstra-backend/api/models/citiesModel.js

22 lines
347 B
JavaScript
Raw Normal View History

2020-02-08 18:59:51 +00:00
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()
// }