🚑 hotfix: critical fix for signup process
All checks were successful
Integration Tests / integration-tests (pull_request) Successful in 29s
All checks were successful
Integration Tests / integration-tests (pull_request) Successful in 29s
This commit is contained in:
@ -13,12 +13,10 @@ export interface ClientInfoHeader {
|
|||||||
export const getUserHeaderInformation = (
|
export const getUserHeaderInformation = (
|
||||||
ctx: Context,
|
ctx: Context,
|
||||||
): UserHeaderInformation => {
|
): UserHeaderInformation => {
|
||||||
const clientInfoHeader = JSON.parse(
|
const clientInfoHeader =
|
||||||
(ctx.request.headers.get("x-client-info") as string) ??
|
(JSON.parse(
|
||||||
("unknown" as string),
|
ctx.request.headers.get("x-client-info") as string,
|
||||||
) as ClientInfoHeader;
|
) as ClientInfoHeader) ?? ("unknown" as string);
|
||||||
|
|
||||||
console.log("Client Info Header:", clientInfoHeader);
|
|
||||||
|
|
||||||
const userHeaderInformation = {
|
const userHeaderInformation = {
|
||||||
ip: clientInfoHeader.ip ?? "unknown",
|
ip: clientInfoHeader.ip ?? "unknown",
|
||||||
|
|||||||
@ -1,13 +1,17 @@
|
|||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "@prisma/client";
|
||||||
import { ErrorForwarder } from "../../../helpers/error/instances/forwarder";
|
import { ErrorForwarder } from "../../../helpers/error/instances/forwarder";
|
||||||
import { userSessionModel } from "../userSession.model";
|
import { userSessionModel } from "../userSession.model";
|
||||||
|
import { generateUUIDv7 } from "../../../helpers/databases/uuidv7";
|
||||||
|
|
||||||
export const createUserSessionRepository = async (
|
export const createUserSessionRepository = async (
|
||||||
data: Prisma.UserSessionUncheckedCreateInput,
|
data: Omit<Prisma.UserSessionUncheckedCreateInput, "id">,
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
return await userSessionModel.create({
|
return await userSessionModel.create({
|
||||||
data,
|
data: {
|
||||||
|
id: generateUUIDv7(),
|
||||||
|
...data,
|
||||||
|
},
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
isAuthenticated: true,
|
isAuthenticated: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user