From 509e3cbc2f100414249f7acf070d3aedf837c367 Mon Sep 17 00:00:00 2001 From: Vivy Bot Date: Sun, 8 Feb 2026 22:19:09 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20hotfix:=20critical=20fix=20for?= =?UTF-8?q?=20signup=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../http/userHeader/getUserHeaderInformation/index.ts | 10 ++++------ .../repositories/createUserSession.repository.ts | 8 ++++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/helpers/http/userHeader/getUserHeaderInformation/index.ts b/src/helpers/http/userHeader/getUserHeaderInformation/index.ts index b76fb0e..c704a50 100644 --- a/src/helpers/http/userHeader/getUserHeaderInformation/index.ts +++ b/src/helpers/http/userHeader/getUserHeaderInformation/index.ts @@ -13,12 +13,10 @@ export interface ClientInfoHeader { export const getUserHeaderInformation = ( ctx: Context, ): UserHeaderInformation => { - const clientInfoHeader = JSON.parse( - (ctx.request.headers.get("x-client-info") as string) ?? - ("unknown" as string), - ) as ClientInfoHeader; - - console.log("Client Info Header:", clientInfoHeader); + const clientInfoHeader = + (JSON.parse( + ctx.request.headers.get("x-client-info") as string, + ) as ClientInfoHeader) ?? ("unknown" as string); const userHeaderInformation = { ip: clientInfoHeader.ip ?? "unknown", diff --git a/src/modules/userSession/repositories/createUserSession.repository.ts b/src/modules/userSession/repositories/createUserSession.repository.ts index 90b7968..f63b29e 100644 --- a/src/modules/userSession/repositories/createUserSession.repository.ts +++ b/src/modules/userSession/repositories/createUserSession.repository.ts @@ -1,13 +1,17 @@ import { Prisma } from "@prisma/client"; import { ErrorForwarder } from "../../../helpers/error/instances/forwarder"; import { userSessionModel } from "../userSession.model"; +import { generateUUIDv7 } from "../../../helpers/databases/uuidv7"; export const createUserSessionRepository = async ( - data: Prisma.UserSessionUncheckedCreateInput, + data: Omit, ) => { try { return await userSessionModel.create({ - data, + data: { + id: generateUUIDv7(), + ...data, + }, select: { id: true, isAuthenticated: true,