Skip to content

Commit

Permalink
fix(hub): hub delete hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed May 15, 2023
1 parent 675a4fd commit af8c45e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Utils/functions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,10 @@ export function createHubListingsEmbed(hub: hubs, extra?: HubListingExtraInput)

export async function deleteHubs(ids: string[]) {
// delete all relations first and then delete the hub
await _prisma.connectedList.deleteMany({ where: { id: { in: ids } } });
await _prisma.hubInvites.deleteMany({ where: { id: { in: ids } } });
await _prisma.messageData.deleteMany({ where: { id: { in: ids } } });
return await _prisma.hubs.deleteMany({ where: { id: { in: ids } } });
await _prisma.connectedList.deleteMany({ where: { hubId: { in: ids } } });
await _prisma.hubInvites.deleteMany({ where: { hubId: { in: ids } } });
await _prisma.messageData.deleteMany({ where: { hubId: { in: ids } } });
await _prisma.hubs.deleteMany({ where: { id: { in: ids } } });
}

export const rulesEmbed = new discord.EmbedBuilder()
Expand Down

0 comments on commit af8c45e

Please sign in to comment.