Files
jtlPosSync/src/endpoints/customergroup.js
2026-07-06 01:31:11 +02:00

14 lines
426 B
JavaScript

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);
}