Skip to content

Commit

Permalink
Move now-and-next feed to /schedule/
Browse files Browse the repository at this point in the history
Our docs say now-and-next.json lives under /schedule/ but it is actually
in the root. All our other feeds are in /schedule/ so we should just
move it there for consistency - this won't break anything now as the
feed returns nothing between events anyway.
  • Loading branch information
Jonty authored and russss committed Jun 15, 2024
1 parent 658cd9b commit 44d3296
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions apps/base/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ def wave_talks():
@base.route("/wave/SiNE")
def sine():
return redirect("https://wiki-archive.emfcamp.org/2014/wiki/SiNE")


@base.route("/now-and-next.json")
@base.route("/upcoming.json")
def old_now_next_feed():
return redirect(url_for("schedule.now_and_next_json"), code=301)
5 changes: 2 additions & 3 deletions apps/schedule/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ def favourites_ical():
return Response(cal.to_ical(), mimetype="text/calendar")


@schedule.route("/now-and-next.json")
@schedule.route("/upcoming.json")
def upcoming():
@schedule.route("/schedule/now-and-next.json")
def now_and_next_json():
return Response(
json.dumps(_get_upcoming(request.args)), mimetype="application/json"
)
Expand Down

0 comments on commit 44d3296

Please sign in to comment.