Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jannik Hellenkamp
website
Commits
e36154b5
Commit
e36154b5
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Patches
Plain Diff
fixed more of the endpoint renaming
parent
a9d53b87
Loading
Loading
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
server.py
+3
-3
3 additions, 3 deletions
server.py
with
3 additions
and
3 deletions
server.py
+
3
−
3
View file @
e36154b5
...
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment