Genesis
This commit is contained in:
13
src/endpoints/customergroup.js
Normal file
13
src/endpoints/customergroup.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { sendJson } from '../http.js';
|
||||
import { getCustomerGroupList } from '../queries/customer-groups.js';
|
||||
|
||||
export const method = 'GET';
|
||||
export const path = '/v1/customergroup';
|
||||
|
||||
export async function handle(_req, res, { url }) {
|
||||
const cursor = Number(url.searchParams.get('lastChangedCustomerGroup')) || 0;
|
||||
|
||||
const customerGroups = await getCustomerGroupList({ cursor });
|
||||
|
||||
return sendJson(res, 200, customerGroups);
|
||||
}
|
||||
Reference in New Issue
Block a user