feat: add migration

This commit is contained in:
Mauricio Siu
2025-02-09 18:19:21 -06:00
parent 6b9fd596e5
commit c04bf3c7e0
31 changed files with 5790 additions and 440 deletions

View File

@@ -94,7 +94,9 @@ export const updateAdminById = async (
};
export const isAdminPresent = async () => {
const admin = await db.query.admins.findFirst();
const admin = await db.query.users.findFirst({
where: eq(users.role, "admin"),
});
if (!admin) {
return false;
}