chore: remove useless returns
All checks were successful
deploy to cloudflare pages / deploy (push) Successful in 32s
All checks were successful
deploy to cloudflare pages / deploy (push) Successful in 32s
This commit is contained in:
parent
d607a4c4b3
commit
679955478b
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue