fixing in userSession

This commit is contained in:
2025-05-11 11:52:19 +07:00
parent e7ecd2dfb8
commit 7adda16a6b
5 changed files with 5 additions and 7 deletions

View File

@ -0,0 +1,25 @@
import { Prisma } from "@prisma/client";
import { userSessionModel } from "../userSession.model";
export const createUserSessionRepo = async (
data: Prisma.UserSessionUncheckedCreateInput
) => {
try {
const newUserRole = await userSessionModel.create({
data: data,
include: {
user: {
omit: {
password: true,
},
include: {
roles: true,
},
},
},
});
return newUserRole;
} catch (error) {
throw error;
}
};