quick fixes
This commit is contained in:
@@ -37,9 +37,9 @@ export const createTeam = createServerFn()
|
||||
const userId = context.userAuthId;
|
||||
const isAdmin = context.roles.includes("Admin");
|
||||
|
||||
if (!isAdmin && !data.players.includes(userId)) {
|
||||
throw new Error("You can only create teams that include yourself as a player");
|
||||
}
|
||||
//if (!isAdmin && !data.players.includes(userId)) {
|
||||
// throw new Error("You can only create teams that include yourself as a player");
|
||||
//}
|
||||
|
||||
logger.info("Creating team", { name: data.name, userId, isAdmin });
|
||||
return pbAdmin.createTeam(data);
|
||||
|
||||
Reference in New Issue
Block a user