Redesign
This commit is contained in:
@@ -17,7 +17,6 @@ import { appConfig } from './core/config/config-loader';
|
||||
import { vehiclesRoutes } from './features/vehicles/api/vehicles.routes';
|
||||
import { fuelLogsRoutes } from './features/fuel-logs/api/fuel-logs.routes';
|
||||
import { stationsRoutes } from './features/stations/api/stations.routes';
|
||||
import tenantManagementRoutes from './features/tenant-management/index';
|
||||
import { documentsRoutes } from './features/documents/api/documents.routes';
|
||||
import { maintenanceRoutes } from './features/maintenance';
|
||||
|
||||
@@ -65,8 +64,6 @@ async function buildApp(): Promise<FastifyInstance> {
|
||||
// Authentication plugin
|
||||
await app.register(authPlugin);
|
||||
|
||||
// Tenant detection is applied at route level after authentication
|
||||
|
||||
// Health check
|
||||
app.get('/health', async (_request, reply) => {
|
||||
return reply.code(200).send({
|
||||
@@ -104,7 +101,6 @@ async function buildApp(): Promise<FastifyInstance> {
|
||||
status: 'verified',
|
||||
userId,
|
||||
roles,
|
||||
tenantId: user['https://motovaultpro.com/tenant_id'] ?? null,
|
||||
verifiedAt: new Date().toISOString()
|
||||
});
|
||||
});
|
||||
@@ -115,7 +111,6 @@ async function buildApp(): Promise<FastifyInstance> {
|
||||
await app.register(fuelLogsRoutes, { prefix: '/api' });
|
||||
await app.register(stationsRoutes, { prefix: '/api' });
|
||||
await app.register(maintenanceRoutes, { prefix: '/api' });
|
||||
await app.register(tenantManagementRoutes);
|
||||
|
||||
// 404 handler
|
||||
app.setNotFoundHandler(async (_request, reply) => {
|
||||
|
||||
Reference in New Issue
Block a user