Skip to content

Commit

Permalink
workorderRoutes uncommented /get
Browse files Browse the repository at this point in the history
  • Loading branch information
michacurri committed Dec 31, 2020
1 parent 90bebfb commit b4ab394
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion .eslintcache

This file was deleted.

File renamed without changes.
16 changes: 8 additions & 8 deletions api/routes/workorderRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ const { createWorkorder } = require("../controllers/workorderController");
// @route GET/workorders
// @desc Returns all workorders
// @access Public
// router.get("/", async (req, res) => {
// try {
// const workorders = await Workorder.find();
// res.json(workorders);
// } catch (err) {
// res.json({ error: err });
// }
// });
router.get("/", async (req, res) => {
try {
const workorders = await Workorder.find();
res.json(workorders);
} catch (err) {
res.json({ error: err });
}
});

// TODO
// @route POST /api/workorders
Expand Down

0 comments on commit b4ab394

Please sign in to comment.