update,
This commit is contained in:
@@ -21,11 +21,11 @@ export async function GET(req: NextRequest) {
|
|||||||
return response({ results: [] }, STATUS.OK);
|
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) {
|
} catch (error) {
|
||||||
return handleError('Product - Get search', error);
|
return handleError('Product - Get search', error);
|
||||||
}
|
}
|
||||||
|
@@ -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=Classic
|
||||||
|
|
||||||
|
###
|
||||||
|
GET http://localhost:7272/api/product/search?query=zzzzzz
|
||||||
|
Reference in New Issue
Block a user