chore: format
This commit is contained in:
parent
b41fd4fef6
commit
d09a77cd2a
1 changed files with 4 additions and 3 deletions
|
@ -19,7 +19,6 @@ import type { IObject } from "./type.js";
|
|||
import { getApId } from "./type.js";
|
||||
import { resolvePerson, updatePerson } from "./models/person.js";
|
||||
|
||||
|
||||
const publicKeyCache = new Cache<UserPublickey | null>("publicKey", 60 * 30);
|
||||
const publicKeyByUserIdCache = new Cache<UserPublickey | null>(
|
||||
"publicKeyByUserId",
|
||||
|
@ -205,9 +204,11 @@ export default class DbResolver {
|
|||
};
|
||||
}
|
||||
|
||||
public async refetchPublicKeyForApId(user: CacheableRemoteUser): Promise<UserPublickey | null> {
|
||||
public async refetchPublicKeyForApId(
|
||||
user: CacheableRemoteUser,
|
||||
): Promise<UserPublickey | null> {
|
||||
await updatePerson(user.uri!, undefined, undefined, user);
|
||||
let key = await UserPublickeys.findOneBy({ userId: user.id });
|
||||
const key = await UserPublickeys.findOneBy({ userId: user.id });
|
||||
if (key != null) {
|
||||
await publicKeyByUserIdCache.set(user.id, key);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue