Skip to content

Commit

Permalink
Pass a registrations=f flag when we aren't showing registrations so w…
Browse files Browse the repository at this point in the history
…e only get events back that are publishing results.
  • Loading branch information
rapind committed Aug 15, 2024
1 parent 81bc4f4 commit a55d752
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
{
node: document.getElementById("cio_results"),
flags: {
subdomain: "demo",
subdomain: "canada",
fullScreenToggle: true,
// section: "competitions", // "leagues" is the default
registration: true,
section: "competitions", // "leagues" is the default
registration: false,
showWaiversForTeams: true,
// eventId: 3742, // If you only want to show one specific event, enter it's ID here.
// excludeEventSections: ["details", "registrations", "spares"],
Expand Down
2 changes: 1 addition & 1 deletion prod.min.js

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions src/Results.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1268,12 +1268,18 @@ getItems : Flags -> ItemFilter -> Cmd Msg
getItems flags itemFilter =
let
params =
case itemFilter.seasonDelta of
0 ->
""
"?occurred="
++ String.fromInt itemFilter.seasonDelta
++ (case ( flags.section, flags.registration ) of
( ProductsSection, _ ) ->
""

( _, False ) ->
"&registrations=f"

seasonDelta ->
"?occurred=" ++ String.fromInt seasonDelta
_ ->
""
)

url =
baseClubUrl flags
Expand Down

0 comments on commit a55d752

Please sign in to comment.