Update docs

This commit is contained in:
Braydon 2024-04-07 23:44:28 -04:00
parent 9526f7488a
commit e97642c889

@ -678,6 +678,9 @@ package me.braydon.mc.controller;
import lombok.NonNull;
import lombok.extern.log4j.Log4j2;
import me.braydon.mc.exception.impl.BadRequestException;
import me.braydon.mc.exception.impl.InvalidMinecraftServerPlatform;
import me.braydon.mc.exception.impl.ResourceNotFoundException;
import me.braydon.mc.model.MinecraftServer;
import me.braydon.mc.model.cache.CachedMinecraftServer;
import me.braydon.mc.service.MojangService;
@ -712,10 +715,15 @@ public final class ServerController {
* @param platform the platform of the server
* @param hostname the hostname of the server
* @return the server
* @throws BadRequestException if the hostname is unknown
* @throws InvalidMinecraftServerPlatform if the platform is invalid
* @throws ResourceNotFoundException if the server isn't found
*/
@GetMapping("/{platform}/{hostname}")
@ResponseBody
public ResponseEntity<CachedMinecraftServer> getServer(@PathVariable @NonNull String platform, @PathVariable @NonNull String hostname) {
public ResponseEntity<CachedMinecraftServer> getServer(@PathVariable @NonNull String platform,@PathVariable @NonNull String hostname)
throws BadRequestException, InvalidMinecraftServerPlatform, ResourceNotFoundException
{
return ResponseEntity.ofNullable(mojangService.getMinecraftServer(platform, hostname));
}