forked from midou/invidious
Extract feed routes (#2269)
* Extract feed routes from invidious.cr * Removes the deprecated route for /feed/top * Deprecate /view_all_playlist & use /feed/playlists * Move feed views into their own directory * Add haltf method to halt current route context * Change status_code + return blocks to use haltf * Set appropriate response headers for RSS routes
This commit is contained in:
@@ -56,3 +56,12 @@ end
|
||||
macro rendered(filename)
|
||||
render "src/invidious/views/#{{{filename}}}.ecr"
|
||||
end
|
||||
|
||||
# Similar to Kemals halt method but works in a
|
||||
# method.
|
||||
macro haltf(env, status_code = 200, response = "")
|
||||
{{env}}.response.status_code = {{status_code}}
|
||||
{{env}}.response.print {{response}}
|
||||
{{env}}.response.close
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user