diff --git a/app/routes/play/index.tsx b/app/routes/play/index.tsx index 96908da0b..234cfc715 100644 --- a/app/routes/play/index.tsx +++ b/app/routes/play/index.tsx @@ -19,6 +19,7 @@ import { makeTitle, parseRequestFormData, requireUser, + validate, } from "~/utils"; import * as LFGGroup from "~/models/LFGGroup.server"; import * as Skill from "~/models/Skill.server"; @@ -51,6 +52,9 @@ export const action: ActionFunction = async ({ request, context }) => { }); const user = requireUser(context); + const ids = await LFGGroup.activeUserIds(); + validate(!ids.has(user.id), "Already in an active group"); + switch (data._action) { case "CREATE_LFG_GROUP": { const getRanked = () => {