diff --git a/03_source/cms_backend/src/app/api/product/helloworld/route.ts b/03_source/cms_backend/src/app/api/product/helloworld/route.ts new file mode 100644 index 0000000..16cbacf --- /dev/null +++ b/03_source/cms_backend/src/app/api/product/helloworld/route.ts @@ -0,0 +1,16 @@ +import type { NextRequest, NextResponse } from 'next/server'; + +import { STATUS, response, handleError } from 'src/utils/response'; + +/** + *************************************** + * GET - helloworld + *************************************** + */ +export async function GET(req: NextRequest, res: NextResponse) { + try { + return response({ helloworld: 'product' }, STATUS.OK); + } catch (error) { + return handleError('Helloworld - Get all', error); + } +} diff --git a/03_source/cms_backend/src/app/api/product/helloworld/test.http b/03_source/cms_backend/src/app/api/product/helloworld/test.http new file mode 100644 index 0000000..0eb0ce3 --- /dev/null +++ b/03_source/cms_backend/src/app/api/product/helloworld/test.http @@ -0,0 +1,4 @@ +### +GET /api/product/helloworld HTTP/1.1 +Host: localhost:7272 +