From 96c0ffe09b980726d79ff41d85be58f83e746576 Mon Sep 17 00:00:00 2001 From: Presti Date: Fri, 1 Nov 2024 16:48:15 +0100 Subject: [PATCH] Fix a few mistakes. --- src/main/java/de/presti/ree6/sql/SQLWorker.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/presti/ree6/sql/SQLWorker.java b/src/main/java/de/presti/ree6/sql/SQLWorker.java index 961f8de..1e2053d 100644 --- a/src/main/java/de/presti/ree6/sql/SQLWorker.java +++ b/src/main/java/de/presti/ree6/sql/SQLWorker.java @@ -1540,7 +1540,7 @@ public Mono existsInvite(long guildId, String inviteCreator, String inv * @param inviteCode the Code of the Invite. */ public void removeInvite(long guildId, String inviteCode) { - deleteEntityInternally(getInvite(guildId, inviteCode)); + getInvite(guildId, inviteCode).subscribe(x -> x.ifPresent(this::deleteEntityInternally)); } /** @@ -1600,7 +1600,7 @@ public Mono> getInvite(long guildId, long inviteCreator, String * @param inviteCode the Code of the Invite. */ public void removeInvite(long guildId, long inviteCreator, String inviteCode) { - deleteEntityInternally(getInvite(guildId, inviteCreator, inviteCode)); + getInvite(guildId, inviteCreator, inviteCode).subscribe(x -> x.ifPresent(this::deleteEntityInternally)); } /** @@ -1612,7 +1612,7 @@ public void removeInvite(long guildId, long inviteCreator, String inviteCode) { * @param inviteUsage the usage count of the Invite. */ public void removeInvite(long guildId, long inviteCreator, String inviteCode, long inviteUsage) { - deleteEntityInternally(getInvite(guildId, inviteCreator, inviteCode, inviteUsage)); + getInvite(guildId, inviteCreator, inviteCode, inviteUsage).subscribe(x -> x.ifPresent(this::deleteEntityInternally)); } /** @@ -2075,7 +2075,7 @@ public void addBirthday(long guildId, long channelId, long userId, String birthd * @param userId the ID of the User. */ public void removeBirthday(long guildId, long userId) { - getEntity(new BirthdayWish(), "FROM BirthdayWish WHERE guildId=:gid AND userId=:uid", Map.of("gid", guildId, "uid", userId)).subscribe(this::deleteEntityInternally); + getEntity(new BirthdayWish(), "FROM BirthdayWish WHERE guildId=:gid AND userId=:uid", Map.of("gid", guildId, "uid", userId)).subscribe(x -> x.ifPresent(this::deleteEntityInternally)); } /**