switch to /player instead of /

This commit is contained in:
Lee 2024-04-07 00:31:33 +01:00
parent 29dead7c7c
commit fa004bc3c8
2 changed files with 8 additions and 3 deletions

View File

@ -9,10 +9,15 @@ import org.springframework.web.bind.annotation.RequestMapping;
@RequestMapping(value = "/")
public class HomeController {
/**
* The example UUID.
*/
private final String exampleUuid = "eeab5f8a-18dd-4d58-af78-2b3c4543da48";
@RequestMapping(value = "/")
public String home(Model model) {
model.addAttribute("url", Consts.getSITE_URL() + "/eeab5f8a-18dd-4d58-af78-2b3c4543da48");
model.addAttribute("avatar_url", Consts.getSITE_URL() + "/avatar/eeab5f8a-18dd-4d58-af78-2b3c4543da48");
model.addAttribute("url", Consts.getSITE_URL() + "/player/" + exampleUuid);
model.addAttribute("avatar_url", Consts.getSITE_URL() + "/player/avatar/" + exampleUuid);
return "index";
}
}

View File

@ -17,7 +17,7 @@ import java.util.Objects;
import java.util.concurrent.TimeUnit;
@RestController
@RequestMapping(value = "/")
@RequestMapping(value = "/player/")
public class PlayerController {
private final CacheControl cacheControl = CacheControl.maxAge(1, TimeUnit.HOURS).cachePublic();