Compare commits
2 Commits
c5bf941c54
...
82fb2a3d23
Author | SHA1 | Date | |
---|---|---|---|
82fb2a3d23 | |||
2e326bb7be |
@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import xyz.mcutils.backend.model.cache.CachedEndpointStatus;
|
import xyz.mcutils.backend.model.cache.CachedEndpointStatus;
|
||||||
import xyz.mcutils.backend.service.MojangService;
|
import xyz.mcutils.backend.service.MojangService;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@ -27,6 +28,6 @@ public class MojangController {
|
|||||||
public ResponseEntity<?> getStatus() {
|
public ResponseEntity<?> getStatus() {
|
||||||
return ResponseEntity.ok()
|
return ResponseEntity.ok()
|
||||||
.cacheControl(CacheControl.maxAge(1, TimeUnit.MINUTES).cachePublic())
|
.cacheControl(CacheControl.maxAge(1, TimeUnit.MINUTES).cachePublic())
|
||||||
.body(mojangService.getMojangServerStatus());
|
.body(Map.of("endpoints", mojangService.getMojangServerStatus()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user