fix: 修复插入删除用户失败的问题

master
luoer 2023-09-26 17:06:15 +08:00
parent e11e1a7f59
commit 1d2fe70f42
7 changed files with 8 additions and 4 deletions

Binary file not shown.

View File

@ -12,9 +12,9 @@ import { AuthModule } from '@/modules/auth';
import { UserModule } from '@/modules/user';
import { ResponseModule } from '@/common/response';
import { SerializationModule } from '@/common/serialization';
import { CacheModule } from './common/cache';
import { ScanModule } from './utils/scan.module';
import { ContentModule } from './content/content.module';
import { CacheModule } from '@/storage/cache';
import { ScanModule } from '@/utils/scan.module';
import { ContentModule } from '@/content/content.module';
@Module({
imports: [
@ -62,6 +62,8 @@ import { ContentModule } from './content/content.module';
* @description
*/
DatabaseModule,
/**
*
*/
@ -78,6 +80,8 @@ import { ContentModule } from './content/content.module';
*
*/
PermissionModule,
/**
*
*/

View File

@ -27,7 +27,7 @@ export class EntitySubscripber implements EntitySubscriberInterface {
}
beforeSoftRemove(event: SoftRemoveEvent<any>): void | Promise<any> {
event.entity.deletedBy = this.getUser();
event.entity && (event.entity.deletedBy = this.getUser());
}
getUser() {