Skip to content

Commit 96c0ffe

Browse files
committed
Fix a few mistakes.
1 parent 8bae5fd commit 96c0ffe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/de/presti/ree6/sql/SQLWorker.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,7 @@ public Mono<Boolean> existsInvite(long guildId, String inviteCreator, String inv
15401540
* @param inviteCode the Code of the Invite.
15411541
*/
15421542
public void removeInvite(long guildId, String inviteCode) {
1543-
deleteEntityInternally(getInvite(guildId, inviteCode));
1543+
getInvite(guildId, inviteCode).subscribe(x -> x.ifPresent(this::deleteEntityInternally));
15441544
}
15451545

15461546
/**
@@ -1600,7 +1600,7 @@ public Mono<Optional<Invite>> getInvite(long guildId, long inviteCreator, String
16001600
* @param inviteCode the Code of the Invite.
16011601
*/
16021602
public void removeInvite(long guildId, long inviteCreator, String inviteCode) {
1603-
deleteEntityInternally(getInvite(guildId, inviteCreator, inviteCode));
1603+
getInvite(guildId, inviteCreator, inviteCode).subscribe(x -> x.ifPresent(this::deleteEntityInternally));
16041604
}
16051605

16061606
/**
@@ -1612,7 +1612,7 @@ public void removeInvite(long guildId, long inviteCreator, String inviteCode) {
16121612
* @param inviteUsage the usage count of the Invite.
16131613
*/
16141614
public void removeInvite(long guildId, long inviteCreator, String inviteCode, long inviteUsage) {
1615-
deleteEntityInternally(getInvite(guildId, inviteCreator, inviteCode, inviteUsage));
1615+
getInvite(guildId, inviteCreator, inviteCode, inviteUsage).subscribe(x -> x.ifPresent(this::deleteEntityInternally));
16161616
}
16171617

16181618
/**
@@ -2075,7 +2075,7 @@ public void addBirthday(long guildId, long channelId, long userId, String birthd
20752075
* @param userId the ID of the User.
20762076
*/
20772077
public void removeBirthday(long guildId, long userId) {
2078-
getEntity(new BirthdayWish(), "FROM BirthdayWish WHERE guildId=:gid AND userId=:uid", Map.of("gid", guildId, "uid", userId)).subscribe(this::deleteEntityInternally);
2078+
getEntity(new BirthdayWish(), "FROM BirthdayWish WHERE guildId=:gid AND userId=:uid", Map.of("gid", guildId, "uid", userId)).subscribe(x -> x.ifPresent(this::deleteEntityInternally));
20792079
}
20802080

20812081
/**

0 commit comments

Comments
 (0)