refactor: migrate endpoints

This commit is contained in:
Mauricio Siu
2025-02-14 02:52:37 -06:00
parent b6c29ccf05
commit 55abac3f2f
19 changed files with 260 additions and 256 deletions

View File

@@ -19,13 +19,13 @@ export const sendDatabaseBackupNotifications = async ({
databaseType,
type,
errorMessage,
adminId,
userId,
}: {
projectName: string;
applicationName: string;
databaseType: "postgres" | "mysql" | "mongodb" | "mariadb";
type: "error" | "success";
adminId: string;
userId: string;
errorMessage?: string;
}) => {
const date = new Date();
@@ -33,7 +33,7 @@ export const sendDatabaseBackupNotifications = async ({
const notificationList = await db.query.notifications.findMany({
where: and(
eq(notifications.databaseBackup, true),
eq(notifications.adminId, adminId),
eq(notifications.userId, userId),
),
with: {
email: true,