Fix API authentication and identity service updates

This commit is contained in:
2026-09-02 18:19:34 +05:30
parent 54cd2a1e5f
commit a579da0f70
8 changed files with 1244 additions and 6 deletions
+5
View File
@@ -2,6 +2,7 @@ import express from 'express';
import cors from 'cors';
import helmet from 'helmet';
import { errorHandler } from './middleware/error';
import { requireApiKey } from './middleware/auth';
// Import routers
import identityRouter from './modules/identity/router';
@@ -39,6 +40,9 @@ app.use((req, res, next) => {
next();
});
// Global API Key Check
app.use(requireApiKey);
// API Routes
app.use('/v1/auth', identityRouter);
app.use('/v1', catalogueRouter);
@@ -61,3 +65,4 @@ app.use(errorHandler);
app.listen(PORT, () => {
console.log(`Pharmacy Core API listening on port ${PORT}`);
});