mirror of
https://github.com/KwiTsukasa/kt-template-online-api.git
synced 2026-05-27 15:44:54 +08:00
11 lines
296 B
TypeScript
11 lines
296 B
TypeScript
import { Injectable, NestMiddleware } from '@nestjs/common';
|
|
import { Request, Response } from 'express';
|
|
|
|
@Injectable()
|
|
export class SaveMiddleware implements NestMiddleware {
|
|
use(req: Request, res: Response, next: VoidFunction) {
|
|
Reflect.deleteProperty(req.body, 'id');
|
|
next();
|
|
}
|
|
}
|