Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const express = require("express");
  2. const Warehouse = require("../models/warehouse");
  3. const router = express.Router();
  4.  
  5. router
  6.   .route("/")
  7.   .get((req, res) => {
  8.     Warehouse.where(req.query)
  9.       .fetchAll()
  10.       .then(warehouses => {
  11.         res.status(200).json(warehouses);
  12.       });
  13.   });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement