Files
dashback/src/v1/index.js
2026-10-21 06:13:31 +02:00

31 lines
1.0 KiB
JavaScript

import { Router } from 'express';
import { posAuthMiddleware } from './middleware/posAuth.js';
import { handleClient } from './routes/client.js';
import { handleInit } from './routes/init.js';
import { handleCategory } from './routes/category.js';
import { handleCustomerGroup } from './routes/customergroup.js';
import { handleCustomer } from './routes/customer.js';
import { handleProduct } from './routes/product.js';
import { handlePimage } from './routes/pimage.js';
const router = Router();
// POS discovery and pairing
router.get('/client', handleClient);
// POS sync initialization counts
router.get('/init', posAuthMiddleware, handleInit);
// POS master data synchronization
router.get('/category', posAuthMiddleware, handleCategory);
router.get('/customergroup', posAuthMiddleware, handleCustomerGroup);
router.get('/customer', posAuthMiddleware, handleCustomer);
router.get('/product', posAuthMiddleware, handleProduct);
// POS image delivery
router.get('/pimage', handlePimage);
router.get('/cimage', handlePimage);
export default router;