fix: 修复插入删除用户失败的问题
parent
e11e1a7f59
commit
1d2fe70f42
Binary file not shown.
|
|
@ -12,9 +12,9 @@ import { AuthModule } from '@/modules/auth';
|
||||||
import { UserModule } from '@/modules/user';
|
import { UserModule } from '@/modules/user';
|
||||||
import { ResponseModule } from '@/common/response';
|
import { ResponseModule } from '@/common/response';
|
||||||
import { SerializationModule } from '@/common/serialization';
|
import { SerializationModule } from '@/common/serialization';
|
||||||
import { CacheModule } from './common/cache';
|
import { CacheModule } from '@/storage/cache';
|
||||||
import { ScanModule } from './utils/scan.module';
|
import { ScanModule } from '@/utils/scan.module';
|
||||||
import { ContentModule } from './content/content.module';
|
import { ContentModule } from '@/content/content.module';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
@ -62,6 +62,8 @@ import { ContentModule } from './content/content.module';
|
||||||
* @description 用于连接数据库
|
* @description 用于连接数据库
|
||||||
*/
|
*/
|
||||||
DatabaseModule,
|
DatabaseModule,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户模块
|
* 用户模块
|
||||||
*/
|
*/
|
||||||
|
|
@ -78,6 +80,8 @@ import { ContentModule } from './content/content.module';
|
||||||
* 权限模块
|
* 权限模块
|
||||||
*/
|
*/
|
||||||
PermissionModule,
|
PermissionModule,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传模块
|
* 上传模块
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export class EntitySubscripber implements EntitySubscriberInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeSoftRemove(event: SoftRemoveEvent<any>): void | Promise<any> {
|
beforeSoftRemove(event: SoftRemoveEvent<any>): void | Promise<any> {
|
||||||
event.entity.deletedBy = this.getUser();
|
event.entity && (event.entity.deletedBy = this.getUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
getUser() {
|
getUser() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue