Update
This commit is contained in:
@@ -19,6 +19,7 @@ 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';
|
||||
|
||||
async function buildApp(): Promise<FastifyInstance> {
|
||||
const app = Fastify({
|
||||
@@ -113,26 +114,9 @@ async function buildApp(): Promise<FastifyInstance> {
|
||||
await app.register(documentsRoutes, { prefix: '/api' });
|
||||
await app.register(fuelLogsRoutes, { prefix: '/api' });
|
||||
await app.register(stationsRoutes, { prefix: '/api' });
|
||||
await app.register(maintenanceRoutes, { prefix: '/api' });
|
||||
await app.register(tenantManagementRoutes);
|
||||
|
||||
// Maintenance feature placeholder (not yet implemented)
|
||||
await app.register(async (fastify) => {
|
||||
// Maintenance routes - basic placeholder for future implementation
|
||||
fastify.get('/api/maintenance*', async (_request, reply) => {
|
||||
return reply.code(501).send({
|
||||
error: 'Not Implemented',
|
||||
message: 'Maintenance feature not yet implemented'
|
||||
});
|
||||
});
|
||||
|
||||
fastify.post('/api/maintenance*', async (_request, reply) => {
|
||||
return reply.code(501).send({
|
||||
error: 'Not Implemented',
|
||||
message: 'Maintenance feature not yet implemented'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// 404 handler
|
||||
app.setNotFoundHandler(async (_request, reply) => {
|
||||
return reply.code(404).send({ error: 'Route not found' });
|
||||
|
||||
Reference in New Issue
Block a user