fix: resolve TypeScript compilation errors in API
- Add explicit IRouter type to all route files - Add explicit Express type to app.ts - Fix env.ts by moving getCorsOrigins after parsing - Fix token.ts SignOptions type for expiresIn - Cast req.params.id to String() in controllers Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { Router } from 'express';
|
||||
import { Router, type IRouter } from 'express';
|
||||
import { authenticate } from '../middlewares/auth.middleware.js';
|
||||
import { tenantMiddleware } from '../middlewares/tenant.middleware.js';
|
||||
import * as alertasController from '../controllers/alertas.controller.js';
|
||||
|
||||
const router = Router();
|
||||
const router: IRouter = Router();
|
||||
|
||||
router.use(authenticate);
|
||||
router.use(tenantMiddleware);
|
||||
|
||||
Reference in New Issue
Block a user