mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-20 22:11:01 +08:00
feat: add point history
This commit is contained in:
@@ -45,10 +45,10 @@ public class InviteService {
|
||||
return invite != null && invite.getUsageCount() < 3;
|
||||
}
|
||||
|
||||
public void consume(String token) {
|
||||
public void consume(String token, String newUserName) {
|
||||
InviteToken invite = inviteTokenRepository.findById(token).orElseThrow();
|
||||
invite.setUsageCount(invite.getUsageCount() + 1);
|
||||
inviteTokenRepository.save(invite);
|
||||
pointService.awardForInvite(invite.getInviter().getUsername());
|
||||
pointService.awardForInvite(invite.getInviter().getUsername(), newUserName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user