You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR REPLACEFUNCTIONpublic.can_pause_tournament(
2
+
tournament public.tournaments,
3
+
hasura_session json
4
+
)
5
+
RETURNS boolean
6
+
LANGUAGE plpgsql STABLE
7
+
AS $$
8
+
BEGIN
9
+
IF tournament.status!='Live' THEN
10
+
RETURN false;
11
+
END IF;
12
+
13
+
IF hasura_session ->>'x-hasura-role'='admin'OR hasura_session ->>'x-hasura-role'='administrator'OR hasura_session ->>'x-hasura-role'='tournament_organizer' THEN
CREATE OR REPLACEFUNCTIONpublic.can_resume_tournament(
2
+
tournament public.tournaments,
3
+
hasura_session json
4
+
)
5
+
RETURNS boolean
6
+
LANGUAGE plpgsql STABLE
7
+
AS $$
8
+
BEGIN
9
+
IF tournament.status!='Paused' THEN
10
+
RETURN false;
11
+
END IF;
12
+
13
+
IF hasura_session ->>'x-hasura-role'='admin'OR hasura_session ->>'x-hasura-role'='administrator'OR hasura_session ->>'x-hasura-role'='tournament_organizer' THEN
0 commit comments