fix: use any types in TenantContextMiddleware to avoid express dependency

The @it0/database package doesn't have @types/express, causing build
failures. Use any types for req/res/next parameters instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-22 00:00:55 -08:00
parent 5b6e7ee363
commit a72cbd3778
1 changed files with 3 additions and 5 deletions

View File

@ -1,12 +1,10 @@
import { Injectable, NestMiddleware } from '@nestjs/common'; import { Injectable, NestMiddleware } from '@nestjs/common';
import { Request, Response, NextFunction } from 'express'; import { TenantContextService, TenantInfo } from '@it0/common';
import { TenantContextService } from '@it0/common';
import { TenantInfo } from '@it0/common';
@Injectable() @Injectable()
export class TenantContextMiddleware implements NestMiddleware { export class TenantContextMiddleware implements NestMiddleware {
use(req: Request, res: Response, next: NextFunction) { use(req: any, res: any, next: () => void) {
const tenantId = req.headers['x-tenant-id'] as string; const tenantId = req.headers?.['x-tenant-id'] as string;
if (!tenantId) { if (!tenantId) {
return next(); return next();