// - [x] GET /api/products - get FDA food products (src/pages/api/products.ts)
// - [x] GET /api/categories - get FDA food product categories (ex: "dairy") (src/pages/api/categories.ts)
Gets a collection of categories, each category will have an array of products in that category
// - [x] GET /api/categories/[cat_id]/products - get FDA food products for a category
[x] instead for now use Product.getProducts() (update implementation to add new products).
Admin APIs
[ ] GET /api/users - get users (src/pages/api/users.ts)
[ ] POST /api/products (body: Product) - add FDA food product (src/pages/api/products.ts)
[ ] POST /api/categories (body: Category) - add FDA food product category (src/pages/api/categories.ts)
(src/pages/api/categories/[cat_id]/products)
users collection
user -> inventory -> item[]
POST /api/users
(body: User) - add a user (src/pages/api/users/index.ts
)GET /api/users/[user_id]
- get a user (src/app/users/[id]/page.tsx ->
src/pages/api/users/[id].ts`)POST /api/users/[user_id]/shelf
(body: Item) - add item to user’s shelf (src/pages/api/users/[user_id]/shelf.ts
)DELETE /api/users/[user_id]/shelf/[item_id]
- remove item from user’s shelf (src/pages/api/users/[user_id]/shelf/[item_id].ts
)products collection
category -> product[]
// - [x]
GET /api/products
- get FDA food products (src/pages/api/products.ts
) // - [x]GET /api/categories
- get FDA food product categories (ex: "dairy") (src/pages/api/categories.ts
) Gets a collection of categories, each category will have an array of products in that category // - [x]GET /api/categories/[cat_id]/products
- get FDA food products for a categoryProduct.getProducts()
(update implementation to add new products).Admin APIs
GET /api/users
- get users (src/pages/api/users.ts
)POST /api/products
(body: Product) - add FDA food product (src/pages/api/products.ts
)POST /api/categories
(body: Category) - add FDA food product category (src/pages/api/categories.ts
) (src/pages/api/categories/[cat_id]/products
)