From 57d3d14ff556ab449f04e6dec24fb89fa66437f9 Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Sun, 21 Jan 2024 19:47:06 +1100 Subject: [PATCH 1/3] Don't accidentally prompt people to make a second account --- gatherling/auth.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gatherling/auth.php b/gatherling/auth.php index b858c8e5f..02248866a 100644 --- a/gatherling/auth.php +++ b/gatherling/auth.php @@ -151,6 +151,9 @@ function prompt_link_account($user)
+ + + From 391aff2ed441319afc99a28734d871b83cb6eba3 Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Sat, 27 Jan 2024 15:07:38 +1100 Subject: [PATCH 2/3] Auth within add_player api call --- gatherling/api.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gatherling/api.php b/gatherling/api.php index f0e7e748a..1b130efca 100644 --- a/gatherling/api.php +++ b/gatherling/api.php @@ -26,11 +26,15 @@ case 'eventinfo': case 'event_info': - $eventname = $_REQUEST['event']; - $event = new Event($eventname); - $result = repr_json_event($event); + if (Event::exists(arg('event'))) { + $event = new Event(arg('event')); + $result = repr_json_event($event); + } else { + $result['error'] = 'Event not found'; + } break; + case 'seriesinfo': case 'series_info': $seriesname = $_REQUEST['series']; @@ -47,6 +51,7 @@ case 'addplayer': case 'add_player': + auth(); $event = new Event(arg('event')); $player = arg('addplayer'); $decklist = arg('decklist', ''); From 48d35d3eb09b434b0ee5527e3905bee64367da60 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sat, 27 Jan 2024 04:07:56 +0000 Subject: [PATCH 3/3] Apply fixes from StyleCI --- gatherling/api.php | 1 - 1 file changed, 1 deletion(-) diff --git a/gatherling/api.php b/gatherling/api.php index 1b130efca..d88b02b32 100644 --- a/gatherling/api.php +++ b/gatherling/api.php @@ -34,7 +34,6 @@ } break; - case 'seriesinfo': case 'series_info': $seriesname = $_REQUEST['series'];
If you already have a Gatherling account, please Log In in with your password, and link via Player Settings.
Username