only allow GET on /mojang/status

This commit is contained in:
Lee 2024-04-13 16:42:21 +01:00
parent 55c2c95269
commit 66f5660274

View File

@ -6,6 +6,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@ -16,6 +17,7 @@ public class MojangController {
@Autowired @Autowired
private MojangService mojangService; private MojangService mojangService;
@ResponseBody
@RequestMapping(value = "/status") @RequestMapping(value = "/status")
public CachedEndpointStatus getStatus() { public CachedEndpointStatus getStatus() {
return mojangService.getMojangApiStatus(); return mojangService.getMojangApiStatus();