chore: remove useless returns
All checks were successful
deploy to cloudflare pages / deploy (push) Successful in 32s

This commit is contained in:
uku 2024-10-26 14:39:02 +02:00
parent d607a4c4b3
commit 679955478b
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@ import type { RequestHandler } from "./$types";
export const POST: RequestHandler = async ({ request, platform }) => {
const kv = platform?.env?.TCL_GUESSR_KV;
if (!kv) return error(500, "could not connect to kv");
if (!kv) error(500, "could not connect to kv");
const data: CheckData = await request.json();
const stop = await stopGame(data.gameId, kv);

View file

@ -11,11 +11,11 @@ import {
export const load: PageServerLoad = async ({ fetch, url, platform }) => {
const kv = platform?.env?.TCL_GUESSR_KV;
if (!kv) return error(500, "could not connect to kv");
if (!kv) error(500, "could not connect to kv");
const mode = url.searchParams.get("mode");
if (mode !== "easy" && mode !== "hard" && mode !== "extreme demon ultra miguel") {
return error(400, "gamemode is invalid");
error(400, "gamemode is invalid");
}
const options: GameOptions = {
@ -40,7 +40,7 @@ export const load: PageServerLoad = async ({ fetch, url, platform }) => {
const randomStop = crossingStops[Math.floor(Math.random() * crossingStops.length)];
if (!randomStop) {
return error(400, "could not select random stop");
error(400, "could not select random stop");
}
const gameId = await createGame(randomStop, kv);