add get all user controller
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
import { userModel } from "../user.model";
|
||||
|
||||
export const getAllUsersService = async () => {
|
||||
try {
|
||||
const allUser = await userModel.findMany({
|
||||
where: {
|
||||
deletedAt: null,
|
||||
},
|
||||
});
|
||||
return allUser;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user