This commit is contained in:
louiscklaw
2025-06-15 12:44:58 +08:00
parent d82afe5a5f
commit 8383be13bc
2 changed files with 6 additions and 3 deletions

View File

@@ -21,11 +21,11 @@ export async function GET(req: NextRequest) {
return response({ results: [] }, STATUS.OK);
}
const testResult = await getProductBySkuOrName(query);
const results = await getProductBySkuOrName(query);
logger('[Product] search-results', testResult?.length);
logger('[Product] search-results', results?.length);
return response({ testResult }, STATUS.OK);
return response({ results }, STATUS.OK);
} catch (error) {
return handleError('Product - Get search', error);
}

View File

@@ -3,3 +3,6 @@ GET http://localhost:7272/api/product/search?query=B
###
GET http://localhost:7272/api/product/search?query=Classic
###
GET http://localhost:7272/api/product/search?query=zzzzzz