From 05d4795f9dc11c854abf83de28fbf4c6fad601b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20M=C3=BCller?= Date: Thu, 1 Apr 2021 10:34:35 +0200 Subject: [PATCH] BETTERZON-49: Creating Module for Crawler --- .idea/modules.xml | 1 + Backend/src/models/categories/categories.router.ts | 6 +++--- Backend/src/models/products/products.router.ts | 8 +++++--- Crawler/requirements.txt | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 Crawler/requirements.txt diff --git a/.idea/modules.xml b/.idea/modules.xml index 66aebf2..44a6847 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -4,6 +4,7 @@ + diff --git a/Backend/src/models/categories/categories.router.ts b/Backend/src/models/categories/categories.router.ts index 409ca71..1af2db5 100644 --- a/Backend/src/models/categories/categories.router.ts +++ b/Backend/src/models/categories/categories.router.ts @@ -19,7 +19,7 @@ export const categoriesRouter = express.Router(); * Controller Definitions */ -// GET items/ +// GET categories/ categoriesRouter.get('/', async (req: Request, res: Response) => { try { @@ -31,7 +31,7 @@ categoriesRouter.get('/', async (req: Request, res: Response) => { } }); -// GET items/:id +// GET categories/:id categoriesRouter.get('/:id', async (req: Request, res: Response) => { const id: number = parseInt(req.params.id, 10); @@ -50,7 +50,7 @@ categoriesRouter.get('/:id', async (req: Request, res: Response) => { } }); -// GET items/:name +// GET categories/search/:term categoriesRouter.get('/search/:term', async (req: Request, res: Response) => { const term: string = req.params.term; diff --git a/Backend/src/models/products/products.router.ts b/Backend/src/models/products/products.router.ts index 0c7cc5c..f2f3353 100644 --- a/Backend/src/models/products/products.router.ts +++ b/Backend/src/models/products/products.router.ts @@ -19,7 +19,7 @@ export const productsRouter = express.Router(); * Controller Definitions */ -// GET items/ +// GET products/ productsRouter.get('/', async (req: Request, res: Response) => { try { @@ -31,7 +31,7 @@ productsRouter.get('/', async (req: Request, res: Response) => { } }); -// GET items/:id +// GET products/:id productsRouter.get('/:id', async (req: Request, res: Response) => { const id: number = parseInt(req.params.id, 10); @@ -50,7 +50,7 @@ productsRouter.get('/:id', async (req: Request, res: Response) => { } }); -// GET items/:name +// GET products/search/:term productsRouter.get('/search/:term', async (req: Request, res: Response) => { const term: string = req.params.term; @@ -69,6 +69,8 @@ productsRouter.get('/search/:term', async (req: Request, res: Response) => { } }); +// GET products/bestDeals + // POST items/ diff --git a/Crawler/requirements.txt b/Crawler/requirements.txt new file mode 100644 index 0000000..d4a7eda --- /dev/null +++ b/Crawler/requirements.txt @@ -0,0 +1 @@ +pymysql