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:
syeopite
2021-08-30 14:58:24 +00:00
committed by GitHub
parent a279d6f433
commit 5005212bec
12 changed files with 462 additions and 449 deletions

View File

@@ -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