fix crash caused by wrong property name in SystemAccountService.ts
This commit is contained in:
parent
75776103a4
commit
2b3fb2ef9f
1 changed files with 3 additions and 3 deletions
|
|
@ -97,11 +97,11 @@ export class SystemAccountService implements OnApplicationShutdown {
|
|||
const userId = await this.cache.fetch(type, async () => {
|
||||
const systemAccount = await this.systemAccountsRepository.findOne({
|
||||
where: { type: type },
|
||||
select: { id: true },
|
||||
}) as { id: string } | null;
|
||||
select: { userId: true },
|
||||
}) as { userId: string } | null;
|
||||
|
||||
if (systemAccount) {
|
||||
return systemAccount.id;
|
||||
return systemAccount.userId;
|
||||
} else {
|
||||
const created = await this.createCorrespondingUser(type, {
|
||||
username: `system.${type}`, // NOTE: (できれば避けたいが) . が含まれるかどうかでシステムアカウントかどうかを判定している処理もあるので変えないように
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue