From e36154b57d9caa9ffb603c3acb1a9584ff273b80 Mon Sep 17 00:00:00 2001 From: Andreas Valder <andreasv@fsmpi.rwth-aachen.de> Date: Thu, 1 Sep 2016 20:24:39 +0200 Subject: [PATCH] fixed more of the endpoint renaming --- server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index 77a00e7..24597db 100755 --- a/server.py +++ b/server.py @@ -81,7 +81,7 @@ def course_id(id): courses = query('SELECT * FROM courses WHERE ((handle = ?) or id = ?) AND (? OR visible)', id, id, ismod()) if not courses: flash('Diese Veranstaltung existiert nicht!') - return app.view_functions['videos'](), 404 + return app.view_functions['course'](), 404 lectures = query('SELECT * FROM lectures WHERE course_id = ? AND (? OR visible)', courses[0]['id'], ismod()) videos = query(''' SELECT videos.*, (videos.downloadable AND courses.downloadable) as downloadable, formats.description AS format_description @@ -105,13 +105,13 @@ def play(id): videos = query('SELECT * FROM videos WHERE lecture_id = ? AND (? OR visible)', id, ismod()) if not lectures: flash('Diese Vorlesung existiert nicht!') - return app.view_functions['videos'](), 404 + return app.view_functions['course'](), 404 if not videos: flash('Zu dieser Vorlesung wurden noch keine Videos veröffentlicht!') courses = query('SELECT * FROM courses WHERE id = ? AND (? OR (visible AND listed))', lectures[0]['course_id'], ismod()) if not courses: flash('Diese Veranstaltung existiert nicht!') - return app.view_functions['videos'](), 404 + return app.view_functions['course'](), 404 return render_template('play.html', course=courses[0], lecture=lectures[0], videos=videos) @app.route('/search') -- GitLab