2024-04-13 20:53:31 +01:00
|
|
|
package xyz.mcutils.backend.controller;
|
2024-04-10 07:43:38 +01:00
|
|
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.ui.Model;
|
2024-04-13 17:40:03 +01:00
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
2024-04-10 07:43:38 +01:00
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
2024-04-13 20:53:31 +01:00
|
|
|
import xyz.mcutils.backend.config.Config;
|
2024-04-10 07:43:38 +01:00
|
|
|
|
|
|
|
@Controller
|
|
|
|
@RequestMapping(value = "/")
|
|
|
|
public class HomeController {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The example UUID.
|
|
|
|
*/
|
|
|
|
private final String exampleUuid = "eeab5f8a-18dd-4d58-af78-2b3c4543da48";
|
2024-04-11 00:21:36 +01:00
|
|
|
private final String exampleServer = "aetheria.cc";
|
2024-04-10 07:43:38 +01:00
|
|
|
|
2024-04-13 17:40:03 +01:00
|
|
|
@GetMapping(value = "/")
|
2024-04-10 07:43:38 +01:00
|
|
|
public String home(Model model) {
|
2024-04-14 15:27:13 +01:00
|
|
|
model.addAttribute("public_url", Config.INSTANCE.getWebPublicUrl());
|
2024-04-10 07:43:38 +01:00
|
|
|
model.addAttribute("player_example_url", Config.INSTANCE.getWebPublicUrl() + "/player/" + exampleUuid);
|
2024-04-10 16:21:07 +01:00
|
|
|
model.addAttribute("java_server_example_url", Config.INSTANCE.getWebPublicUrl() + "/server/java/" + exampleServer);
|
2024-04-13 15:34:19 +01:00
|
|
|
model.addAttribute("mojang_endpoint_status_url", Config.INSTANCE.getWebPublicUrl() + "/mojang/status");
|
2024-04-11 00:21:36 +01:00
|
|
|
model.addAttribute("swagger_url", Config.INSTANCE.getWebPublicUrl() + "/swagger-ui.html");
|
2024-04-10 07:43:38 +01:00
|
|
|
return "index";
|
|
|
|
}
|
|
|
|
}
|