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:
parent
5b6e7ee363
commit
a72cbd3778
|
|
@ -1,12 +1,10 @@
|
|||
import { Injectable, NestMiddleware } from '@nestjs/common';
|
||||
import { Request, Response, NextFunction } from 'express';
|
||||
import { TenantContextService } from '@it0/common';
|
||||
import { TenantInfo } from '@it0/common';
|
||||
import { TenantContextService, TenantInfo } from '@it0/common';
|
||||
|
||||
@Injectable()
|
||||
export class TenantContextMiddleware implements NestMiddleware {
|
||||
use(req: Request, res: Response, next: NextFunction) {
|
||||
const tenantId = req.headers['x-tenant-id'] as string;
|
||||
use(req: any, res: any, next: () => void) {
|
||||
const tenantId = req.headers?.['x-tenant-id'] as string;
|
||||
|
||||
if (!tenantId) {
|
||||
return next();
|
||||
|
|
|
|||
Loading…
Reference in New Issue