floranet/api/controller/Delivery/delivery.controller.js

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();