Skip to content

Commit

Permalink
move frab xml schedule to /schedule/frab-<year>.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Aug 14, 2024
1 parent 78a4eda commit 550b857
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/schedule/feeds.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
from datetime import timedelta
from icalendar import Calendar, Event
from flask import request, abort, current_app as app, Response
from flask import request, abort, current_app as app, redirect, url_for, Response
from flask_cors import cross_origin
from flask_login import current_user
from math import ceil
Expand Down Expand Up @@ -193,6 +193,10 @@ def duration_hhmm(duration_minutes):

@schedule.route("/schedule/<int:year>.frab")
def schedule_frab(year):
return redirect(url_for('schedule_frab_xml', year=year), code=301)

@schedule.route("/schedule/frab-<int:year>.xml")
def schedule_frab_xml(year):
if year != event_year():
return feed_historic(year, "frab")

Expand Down

0 comments on commit 550b857

Please sign in to comment.