fixing in userSession
This commit is contained in:
@ -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;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user