package eu.mhsl.minenet.minigames.api.routes.closeRoom;

import eu.mhsl.minenet.minigames.api.Controller;
import eu.mhsl.minenet.minigames.instance.room.Room;
import spark.Response;

import java.util.UUID;

record Req(UUID room) {}
record Resp() {}
public class CloseRoom extends Controller<Req, Resp> {
    @Override
    public Resp handle(Req request, Response response) {
        Room.deleteRoom(Room.getRoom(request.room()).orElseThrow());
        return new Resp();
    }
}
