14 lines
307 B
JavaScript
14 lines
307 B
JavaScript
const db = require("../../db/db");
|
|
|
|
class DeliveryController {
|
|
async findByPostalCode(req, res) {
|
|
const { postalCode } = req.query;
|
|
const dates = await db.deliveryDate_get(postalCode);
|
|
return res.status(200).send({
|
|
data: dates[0]
|
|
})
|
|
}
|
|
}
|
|
|
|
module.exports = new DeliveryController();
|