loadenv에서 수명 관련 환경 변수의 값을 미리 밀리초 단위로 변환해놓도록 변경

This commit is contained in:
static
2025-01-08 22:21:21 +09:00
parent d7396945df
commit 1699d985ac
8 changed files with 15 additions and 23 deletions

View File

@@ -1,5 +1,4 @@
import { error } from "@sveltejs/kit";
import ms from "ms";
import {
createClient,
getClient,
@@ -27,8 +26,7 @@ export const getUserClientList = async (userId: number) => {
};
};
const expiresIn = ms(env.challenge.userClientExp);
const expiresAt = () => new Date(Date.now() + expiresIn);
const expiresAt = () => new Date(Date.now() + env.challenge.userClientExp);
const createUserClientChallenge = async (
userId: number,