fix crash caused by wrong property name in SystemAccountService.ts

This commit is contained in:
Hazelnoot 2025-10-07 19:46:03 -04:00
parent 75776103a4
commit 2b3fb2ef9f

View file

@ -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: (できれば避けたいが) . が含まれるかどうかでシステムアカウントかどうかを判定している処理もあるので変えないように