feat(POS-004): completed feature
This commit is contained in:
@@ -43,6 +43,7 @@ import { registerCheckoutRoutes } from '../modules/checkout/index.js';
|
||||
import { registerPaymentsRoutes } from '../modules/payments/index.js';
|
||||
import { registerNotificationsRoutes } from '../modules/notifications/index.js';
|
||||
import { registerReportingRoutes } from '../modules/reporting/index.js';
|
||||
import { registerPosRoutes } from '../modules/pos/api/pos.routes.js';
|
||||
import { registerReviewsRoutes } from '../modules/reviews/index.js';
|
||||
import { registerCmsRoutes } from '../modules/cms/index.js';
|
||||
import { registerStoreSettingsRoutes } from '../modules/store-settings/index.js';
|
||||
@@ -322,6 +323,16 @@ export async function buildApp(deps: BuildAppDeps = {}): Promise<FastifyInstance
|
||||
});
|
||||
});
|
||||
|
||||
// POS routes (POS-004)
|
||||
if (deps.pool && combinedAuth) {
|
||||
await app.register(async (instance) => {
|
||||
await registerPosRoutes(instance, {
|
||||
pool: deps.pool as pg.Pool,
|
||||
authenticate: combinedAuth,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const { telemetry, meter } = createInMemoryTelemetry();
|
||||
|
||||
await app.register(async (instance) => {
|
||||
|
||||
Reference in New Issue
Block a user