list of products
This commit is contained in:
parent
52713221eb
commit
2b2e6682db
2 changed files with 0 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue