mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 04:04:16 +00:00
fix cherry-pick error: restore CacheService.findOptionalUserById
This commit is contained in:
@@ -350,6 +350,11 @@ export class CacheService implements OnApplicationShutdown {
|
|||||||
}) ?? null;
|
}) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@bindThis
|
||||||
|
public findOptionalUserById(userId: MiUser['id']) {
|
||||||
|
return this.userByIdCache.fetchMaybe(userId, async () => await this.usersRepository.findOneBy({ id: userId }) ?? undefined);
|
||||||
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async getFollowStats(userId: MiUser['id']): Promise<FollowStats> {
|
public async getFollowStats(userId: MiUser['id']): Promise<FollowStats> {
|
||||||
return await this.userFollowStatsCache.fetch(userId, async () => {
|
return await this.userFollowStatsCache.fetch(userId, async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user