File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import { ProductCollectionDTO } from "@medusajs/types/dist/product"
4
4
import { notFound } from "next/navigation"
5
5
import getPrices from "@lib/util/get-product-prices"
6
6
7
+ /**
8
+ * This endpoint uses the serverless Product Module to retrieve a collection and its products by handle.
9
+ * The module connects directly to you Medusa database to retrieve and manipulate data, without the need for a dedicated server.
10
+ * Read more about the Product Module here: https://docs.medusajs.com/modules/products/serverless-module
11
+ */
7
12
export async function GET (
8
13
request : NextRequest ,
9
14
{ params } : { params : Record < string , any > }
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ import { NextRequest, NextResponse } from "next/server"
2
2
import { initialize as initializeProductModule } from "@medusajs/product"
3
3
import { notFound } from "next/navigation"
4
4
5
+ /**
6
+ * This endpoint uses the serverless Product Module to list and count all product collections.
7
+ * The module connects directly to you Medusa database to retrieve and manipulate data, without the need for a dedicated server.
8
+ * Read more about the Product Module here: https://docs.medusajs.com/modules/products/serverless-module
9
+ */
5
10
export async function GET ( request : NextRequest ) {
6
11
const productService = await initializeProductModule ( )
7
12
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ import getPrices from "@lib/util/get-product-prices"
3
3
4
4
import { initialize as initializeProductModule } from "@medusajs/product"
5
5
6
+ /**
7
+ * This endpoint uses the serverless Product Module to retrieve a product by handle.
8
+ * The module connects directly to you Medusa database to retrieve and manipulate data, without the need for a dedicated server.
9
+ * Read more about the Product Module here: https://docs.medusajs.com/modules/products/serverless-module
10
+ */
6
11
export async function GET (
7
12
request : NextRequest ,
8
13
{ params } : { params : Record < string , any > }
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ import {
8
8
} from "@medusajs/types/dist/product/common"
9
9
import { notFound } from "next/navigation"
10
10
11
+ /**
12
+ * This endpoint uses the serverless Product Module to retrieve a list of products.
13
+ * The module connects directly to you Medusa database to retrieve and manipulate data, without the need for a dedicated server.
14
+ * Read more about the Product Module here: https://docs.medusajs.com/modules/products/serverless-module
15
+ */
11
16
export async function GET ( request : NextRequest ) {
12
17
const queryParams = Object . fromEntries ( request . nextUrl . searchParams )
13
18
You can’t perform that action at this time.
0 commit comments