Compare commits

...

2 Commits

Author SHA1 Message Date
zawa-ch. c0c1e26b37
Merge 002fc56166 into 7b9c884a5d 2024-11-19 10:41:43 +09:00
zawa-ch 002fc56166 アカウント削除のモデレーションログが動作していないのを修正 2024-11-18 17:57:26 +00:00
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new Error('cannot delete a root account'); throw new Error('cannot delete a root account');
} }
await this.deleteAccoountService.deleteAccount(user); await this.deleteAccoountService.deleteAccount(user, me);
}); });
} }
} }

View File

@ -33,13 +33,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private deleteAccountService: DeleteAccountService, private deleteAccountService: DeleteAccountService,
) { ) {
super(meta, paramDef, async (ps) => { super(meta, paramDef, async (ps, me) => {
const user = await this.usersRepository.findOneByOrFail({ id: ps.userId }); const user = await this.usersRepository.findOneByOrFail({ id: ps.userId });
if (user.isDeleted) { if (user.isDeleted) {
return; return;
} }
await this.deleteAccountService.deleteAccount(user); await this.deleteAccountService.deleteAccount(user, me);
}); });
} }
} }