From 554588fb42d941a1517bded1ecea4e13f310608a Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sat, 9 Mar 2024 15:15:54 +0000 Subject: [PATCH] fix: sessionKey --- @sammo/gateway_server/src/api/Login/LoginByID.ts | 4 ++-- @sammo/gateway_server/src/api/Login/LoginByToken.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/@sammo/gateway_server/src/api/Login/LoginByID.ts b/@sammo/gateway_server/src/api/Login/LoginByID.ts index dd1f1e2..73c2b92 100644 --- a/@sammo/gateway_server/src/api/Login/LoginByID.ts +++ b/@sammo/gateway_server/src/api/Login/LoginByID.ts @@ -3,7 +3,7 @@ import { StartSession } from "@sammo/server_util"; import { POST, type APIReturnType } from "@strpc/express"; import { declProcDecorators } from "@strpc/express/proc_decorator"; import { z } from "zod"; -import { loginCtxSessionKey, type GatewayLoginCtx } from "@/procDecorator/ReqGatewayLogin.js"; +import { gatewayLoginCtxSessionKey, type GatewayLoginCtx } from "@/procDecorator/ReqGatewayLogin.js"; import { delay } from "@sammo/util"; type BaseAPI = typeof structure.Login.LoginByID; @@ -52,7 +52,7 @@ export const LoginByID = POST(LoginByIDReq)(declProcDecorators( loginDate: new Date(), } - ctx.session.setItem(loginCtxSessionKey, loginCtx); + ctx.session.setItem(gatewayLoginCtxSessionKey, loginCtx); return { diff --git a/@sammo/gateway_server/src/api/Login/LoginByToken.ts b/@sammo/gateway_server/src/api/Login/LoginByToken.ts index 3b9fa9a..e8e22e5 100644 --- a/@sammo/gateway_server/src/api/Login/LoginByToken.ts +++ b/@sammo/gateway_server/src/api/Login/LoginByToken.ts @@ -3,7 +3,7 @@ import { StartSession } from "@sammo/server_util"; import { POST, type APIReturnType } from "@strpc/express"; import { declProcDecorators } from "@strpc/express/proc_decorator"; import { z } from "zod"; -import { loginCtxSessionKey, type GatewayLoginCtx } from "@/procDecorator/ReqGatewayLogin.js"; +import { gatewayLoginCtxSessionKey, type GatewayLoginCtx } from "@/procDecorator/ReqGatewayLogin.js"; import { delay } from "@sammo/util"; type BaseAPI = typeof structure.Login.LoginByToken; @@ -38,7 +38,7 @@ export const LoginByToken = POST(LoginByTokenReq)(declProcDecorators( loginDate: new Date(), } - ctx.session.setItem(loginCtxSessionKey, loginCtx); + ctx.session.setItem(gatewayLoginCtxSessionKey, loginCtx); //throw new Error("Method not implemented.");