mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2026-12-01 03:41:16 +00:00
BETTERZON-95: Adding API endpoint for getting, inserting and updating contact persons (#52)
This commit is contained in:
1 parent
8f17ae7896
commit
3ae68b3df3
6 files changed
+323
-3
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user