Add Meshkee product catalog navigation and details
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
00126e5777
commit
34ce4f6925
@@ -0,0 +1,17 @@
|
||||
import { fetchProductCategories } from "../../../lib/meshkee";
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const items = await fetchProductCategories();
|
||||
return Response.json(
|
||||
{ items },
|
||||
{
|
||||
headers: {
|
||||
"Cache-Control": "public, max-age=300, stale-while-revalidate=3600",
|
||||
},
|
||||
},
|
||||
);
|
||||
} catch {
|
||||
return Response.json({ items: [] }, { status: 502 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user