1
0
forked from PGL/Clyde

Fixing tests and tokenService

This commit is contained in:
2024-04-22 20:35:30 +02:00
parent 5516f75346
commit 772fa09e28
3 changed files with 8 additions and 5 deletions

View File

@ -51,8 +51,8 @@ public class TokenService {
ArrayList<Token> tokenList = tokenRepo.getByUserOrderByExpirationDate(token.getUser());
while(tokenList.size() >= 5){
tokenRepo.delete(tokenList.getFirst());
tokenList.remove(tokenList.getFirst());
tokenRepo.delete(tokenList.get(0));
tokenList.remove(tokenList.get(0));
}
tokenRepo.save(token);
}