add step in auth verification
This commit is contained in:
@ -1,31 +0,0 @@
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
omit: {
|
||||
lastOnline: true,
|
||||
deletedAt: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
},
|
||||
});
|
||||
return newUserRole;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user