list of products

This commit is contained in:
Kfir Dayan 2023-06-09 19:15:53 +03:00
parent 52713221eb
commit 2b2e6682db
2 changed files with 0 additions and 5 deletions

View file

@ -18,9 +18,6 @@ export async function createProduct(req: Request, res: Response) {
}
}
// List products: This should allow any user to view a paginated list of
// products, sorted by price.
export async function listProducts(req: Request, res: Response) {
try {
const { page, limit } = req.query;

View file

@ -6,8 +6,6 @@ import { createProduct, listProducts } from '../controllers/ProductController';
const productRouter = express.Router();
// Create a product: This should require an authenticated user to provide a
// product name, description, and price.
productRouter.post('/', authenticateToken, createProduct)
productRouter.get('/', listProducts);