- Added dotenv configuration for environment variables - Fixed MongoDB connection string loading - Configured server port to 3005 - Updated cron jobs for expired messages
16 lines
344 B
JavaScript
16 lines
344 B
JavaScript
const { ProvinceModel } = require('../../models/StateCity')
|
|
|
|
const getProvinces = async (req, res, next) => {
|
|
try {
|
|
const provinces = await ProvinceModel.find({})
|
|
res.status(200).json({
|
|
provinces
|
|
})
|
|
} catch (err) {
|
|
res.status(500).send('Internal Server Error')
|
|
}
|
|
}
|
|
module.exports = {
|
|
getProvinces
|
|
}
|