Skip to content

Commit

Permalink
Add schedule by person
Browse files Browse the repository at this point in the history
  • Loading branch information
v1ack committed Dec 3, 2020
1 parent 4f5f7bf commit a25bcfc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion calendar_fu/calendar_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def create_calendar(
return calendar.ical()


async def download_calendar_json(id: int, type: str):
async def download_calendar_json(id: str, type: str):
date_start, date_end = get_dates()
async with ClientSession() as client:
try:
Expand Down
2 changes: 1 addition & 1 deletion calendar_fu/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def params_handler(query: MultiDict) -> dict:
class CalendarView(BaseView):
async def get(self):
type = self.request.match_info["type"]
id = int(self.request.match_info["id"])
id = self.request.match_info["id"]
params = params_handler(self.request.rel_url.query)
filename = f"{type}_{id}"
last_update = await self.cache.last_update(filename)
Expand Down
2 changes: 1 addition & 1 deletion calendar_fu/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def create_application(self) -> Application:
app.add_routes(
[
view(
r"/calendar/{type:(group|lecturer)}/{id:\d+}{f:(.ics)?}",
r"/calendar/{type:(group|lecturer|person)}/{id:[\d\w-]+}{f:(.ics)?}",
CalendarView,
),
]
Expand Down

0 comments on commit a25bcfc

Please sign in to comment.