14 lines
300 B
JavaScript
14 lines
300 B
JavaScript
'use strict';
|
|
|
|
const Country = require('../model/country'),
|
|
error = require('../helpers/error');
|
|
|
|
async function getCountries_get(req, res) {
|
|
|
|
const countries = await Country.find({}, { code: 1, name: 1, _id: 0 }, { lean: true });
|
|
res.json(countries);
|
|
}
|
|
|
|
module.exports = {
|
|
getCountries_get
|
|
} |