Update SystemAccountService.ts

This commit is contained in:
syuilo 2025-02-21 18:29:41 +09:00
parent 744e1d2ba3
commit d398f53a03
1 changed files with 7 additions and 0 deletions

View File

@ -41,6 +41,13 @@ export class SystemAccountService {
this.cache = new MemoryKVCache<MiLocalUser>(1000 * 60 * 10); // 10m
}
@bindThis
public async list(): Promise<MiSystemAccount[]> {
const accounts = await this.systemAccountsRepository.findBy({});
return accounts;
}
@bindThis
public async fetch(type: typeof SYSTEM_ACCOUNT_TYPES[number]): Promise<MiLocalUser> {
const cached = this.cache.get(type);