BETTERZON-95: Adding API endpoint for getting, inserting and updating contact persons (#52)

This commit is contained in:
Patrick
2021-05-18 21:14:00 +02:00
committed by GitHub
parent 8f17ae7896
commit 3ae68b3df3
6 changed files with 323 additions and 3 deletions
@@ -19,7 +19,7 @@ export const manufacturersRouter = express.Router();
* Controller Definitions
*/
// GET items/
// GET manufacturers/
manufacturersRouter.get('/', async (req: Request, res: Response) => {
try {
const manufacturers: Manufacturers = await ManufacturerService.findAll();
@@ -31,7 +31,7 @@ manufacturersRouter.get('/', async (req: Request, res: Response) => {
}
});
// GET items/:id
// GET manufacturers/:id
manufacturersRouter.get('/:id', async (req: Request, res: Response) => {
const id: number = parseInt(req.params.id, 10);
@@ -50,7 +50,7 @@ manufacturersRouter.get('/:id', async (req: Request, res: Response) => {
}
});
// GET items/:term
// GET manufacturers/:term
manufacturersRouter.get('/search/:term', async (req: Request, res: Response) => {
const term: string = req.params.term;