Skip to content

As a developer I want to fetch the full upcoming schedule from sporty.no so the gym calendar always covers the next 10 days #99

@ChristopherRotnes

Description

@ChristopherRotnes

Summary

The sporty.no sync currently fetches from https://sporty.no/api/v1/businessunits/8/groupactivities with from and to query parameters set to today and today+10 days. However, the latestRow in gym_calendar only reaches today rather than 10 days ahead, suggesting either the parameter names are wrong and sporty.no is ignoring them, or the gym simply hasn't published next week's schedule yet. The correct parameter names need to be identified (e.g. by inspecting the network requests the sporty.no website makes) and confirmed to work end-to-end.

Priority

Low

Acceptance criteria

  • Identify the correct query parameter names sporty.no uses for date range filtering (inspect network requests on the sporty.no schedule page)
  • Update buildSportyUrl() in app/api/sportySync.js with the confirmed parameter names
  • After a sync, GET /api/sporty-health shows latestRow consistently ~10 days ahead of today
  • Verify behaviour when next week's schedule is not yet published — sync should still succeed with 0 new rows, not error

Out of scope

  • Changing the 10-day lookahead window
  • Supporting multiple gyms

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions