TomDoesTech/REST-API-Tutorial-Updated

typo on delete product route?

Aron-HD opened this issue · 2 comments

I believe there is a typo in the product delete route, where get handler is used instead of delete handler.

import {
  createProductHandler,
  <---------------------------------- deleteProductHandler,
  getProductHandler,
  updateProductHandler
} from './controller/product.controller';

   ...

  app.delete(
    '/api/products/:productId',
    [requireUser, validateResource(deleteProductSchema)],
    getProductHandler <---------------------------------------- deleteProductHandler
  );

(Awesome tutorial btw, enjoyed building it and am moving onto testing next!)

Yup, looks like a typo. Do you want to submit a PR to fix it?

sure - submitted :)