put player in a player object in the return json and update the cache information in json responses
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Failing after 22s

This commit is contained in:
Lee
2024-04-13 17:10:40 +01:00
parent 2895525412
commit c198339acc
9 changed files with 92 additions and 37 deletions

View File

@ -5,6 +5,7 @@ import cc.fascinated.common.EndpointStatus;
import cc.fascinated.common.ExpiringSet;
import cc.fascinated.common.WebRequest;
import cc.fascinated.config.Config;
import cc.fascinated.model.cache.CacheInformation;
import cc.fascinated.model.cache.CachedEndpointStatus;
import cc.fascinated.model.mojang.MojangProfile;
import cc.fascinated.model.mojang.MojangUsernameToUuid;
@ -231,10 +232,10 @@ public class MojangService {
CachedEndpointStatus status = new CachedEndpointStatus(
MOJANG_ENDPOINT_STATUS_KEY,
endpoints,
System.currentTimeMillis()
CacheInformation.defaultCache()
);
mojangEndpointStatusRepository.save(status);
status.setCached(-1L); // Indicate that the status is not cached
status.getCache().setCached(false);
return status;
}