summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-03-22 15:16:45 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-03-22 15:16:45 +0900
commit0e3e90f94f684ab0dcd8039dd2087241b85ac612 (patch)
tree1c49d16ca572c44350b2ac3fb80c1c2e06cd8f80 /src
parentperf(server): Cache user keypair (diff)
downloadsharkey-0e3e90f94f684ab0dcd8039dd2087241b85ac612.tar.gz
sharkey-0e3e90f94f684ab0dcd8039dd2087241b85ac612.tar.bz2
sharkey-0e3e90f94f684ab0dcd8039dd2087241b85ac612.zip
refactor
Diffstat (limited to 'src')
-rw-r--r--src/misc/keypair-store.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc/keypair-store.ts b/src/misc/keypair-store.ts
index 43f451110c..c78fdd7555 100644
--- a/src/misc/keypair-store.ts
+++ b/src/misc/keypair-store.ts
@@ -6,5 +6,5 @@ import { Cache } from './cache';
const cache = new Cache<UserKeypair>(Infinity);
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));
}