add get all user controller

This commit is contained in:
rafiarrafif
2025-05-07 16:51:00 +07:00
parent 0f506debfb
commit afa05daab1
4 changed files with 36 additions and 6 deletions

View File

@ -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;
}
};