mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
refactor
This commit is contained in:
parent
7c3086e9d9
commit
0e3e90f94f
1 changed files with 1 additions and 1 deletions
|
@ -6,5 +6,5 @@ import { Cache } from './cache';
|
||||||
const cache = new Cache<UserKeypair>(Infinity);
|
const cache = new Cache<UserKeypair>(Infinity);
|
||||||
|
|
||||||
export async function getUserKeypair(userId: User['id']): Promise<UserKeypair> {
|
export async function getUserKeypair(userId: User['id']): Promise<UserKeypair> {
|
||||||
return await cache.fetch(userId, async () => await UserKeypairs.findOneOrFail(userId));
|
return await cache.fetch(userId, () => UserKeypairs.findOneOrFail(userId));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue