Files
Backend/src/main/java/cc/fascinated/controller/MojangController.java

27 lines
1001 B
Java
Raw Normal View History

2024-04-13 15:34:19 +01:00
package cc.fascinated.controller;
import cc.fascinated.model.cache.CachedEndpointStatus;
import cc.fascinated.service.MojangService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
2024-04-13 17:40:03 +01:00
import org.springframework.web.bind.annotation.GetMapping;
2024-04-13 15:34:19 +01:00
import org.springframework.web.bind.annotation.RequestMapping;
2024-04-13 16:42:21 +01:00
import org.springframework.web.bind.annotation.ResponseBody;
2024-04-13 15:34:19 +01:00
import org.springframework.web.bind.annotation.RestController;
@RestController
@Tag(name = "Mojang Controller", description = "The Mojang Controller is used to get information about the Mojang APIs.")
@RequestMapping(value = "/mojang/", produces = MediaType.APPLICATION_JSON_VALUE)
public class MojangController {
@Autowired
private MojangService mojangService;
2024-04-13 16:42:21 +01:00
@ResponseBody
2024-04-13 17:40:03 +01:00
@GetMapping(value = "/status")
2024-04-13 15:34:19 +01:00
public CachedEndpointStatus getStatus() {
return mojangService.getMojangApiStatus();
}
}