Skip to content

Commit

Permalink
Add trailing slash convention
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmwatson committed Jul 30, 2024
1 parent 8ae5824 commit 97e4c28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pmg/api/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,17 @@ def daily_schedules(id=None):
return api_list_items(DailySchedule.list(), DailyScheduleSchema)


@api.route("/bill-tracker")
@api.route("/bill-tracker/")
def bill_tracker():
# Return background-worker produced static JSON file from pmg/static/bill-tracker.json
try:
with open("pmg/static/bill-tracker.json", "r") as f:
return f.read()
except FileNotFoundError:
return abort(404)
return abort(500)


@api.route("/bill-tracker/update")
@api.route("/bill-tracker/update/")
def bill_tracker_update():
# Update the bill-tracker.json file
produce_bill_tracker_json()
Expand Down

0 comments on commit 97e4c28

Please sign in to comment.