Active player list
This commit is contained in:
@@ -4,7 +4,7 @@ import { Content } from "../../components/Content.tsx";
|
||||
import { SERVER_STATE } from "../../state/serverState.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
async POST(req, _ctx) {
|
||||
POST(req, _ctx) {
|
||||
const url = new URL(req.url);
|
||||
SERVER_STATE.acceptEULA();
|
||||
return Response.redirect(url.origin + '/setup/start');
|
||||
|
@@ -1,27 +0,0 @@
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { Content } from "../../components/Content.tsx";
|
||||
import { Terminal } from "../../islands/terminal.tsx";
|
||||
import { SERVER_STATE } from "../../state/serverState.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
async GET(req,ctx) {
|
||||
if (!SERVER_STATE.eulaAccepted) {
|
||||
const url = new URL(req.url);
|
||||
return Response.redirect(`${url.origin}/setup/eula`)
|
||||
}
|
||||
|
||||
const res = await ctx.render();
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
export default function StartFabric() {
|
||||
SERVER_STATE.startMCServer();
|
||||
return (
|
||||
<div class="container p-8">
|
||||
<Content>
|
||||
<Terminal channelId={SERVER_STATE.channelId} />
|
||||
</Content>
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user