fix: sessionKey
This commit is contained in:
@@ -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<BaseAPI>(LoginByIDReq)(declProcDecorators(
|
||||
loginDate: new Date(),
|
||||
}
|
||||
|
||||
ctx.session.setItem(loginCtxSessionKey, loginCtx);
|
||||
ctx.session.setItem(gatewayLoginCtxSessionKey, loginCtx);
|
||||
|
||||
|
||||
return {
|
||||
|
||||
@@ -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<BaseAPI>(LoginByTokenReq)(declProcDecorators(
|
||||
loginDate: new Date(),
|
||||
}
|
||||
|
||||
ctx.session.setItem(loginCtxSessionKey, loginCtx);
|
||||
ctx.session.setItem(gatewayLoginCtxSessionKey, loginCtx);
|
||||
|
||||
|
||||
//throw new Error("Method not implemented.");
|
||||
|
||||
Reference in New Issue
Block a user