🐛 fix: user client info in oauth flow

This commit is contained in:
2026-01-20 09:39:50 +07:00
parent fb3d0b5e9b
commit 22428c720c
8 changed files with 45 additions and 54 deletions

View File

@ -23,14 +23,13 @@ type CreateUserSessionResponse = Prisma.UserSessionGetPayload<{
}>;
export const createUserSessionRepository = async (
data: Prisma.UserSessionUncheckedCreateInput
data: Prisma.UserSessionUncheckedCreateInput,
) => {
try {
return await userSessionModel.create({
data,
select: {
id: true,
deviceType: true,
isAuthenticated: true,
validUntil: true,
user: {
@ -42,6 +41,12 @@ export const createUserSessionRepository = async (
avatar: true,
birthDate: true,
bioProfile: true,
preference: {
omit: {
updatedAt: true,
createdAt: true,
},
},
},
},
},