block sending emails on limits (#216)

This commit is contained in:
KM Koushik
2025-09-08 18:08:57 +10:00
committed by GitHub
parent 5b3022c27b
commit 55d8c7e998
21 changed files with 844 additions and 132 deletions

View File

@@ -28,13 +28,15 @@ export async function createContactBook(teamId: number, name: string) {
});
}
return db.contactBook.create({
const created = await db.contactBook.create({
data: {
name,
teamId,
properties: {},
},
});
return created;
}
export async function getContactBookDetails(contactBookId: string) {
@@ -79,5 +81,7 @@ export async function updateContactBook(
}
export async function deleteContactBook(contactBookId: string) {
return db.contactBook.delete({ where: { id: contactBookId } });
const deleted = await db.contactBook.delete({ where: { id: contactBookId } });
return deleted;
}