mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-22 16:29:10 -04:00
Add haltf method to halt current route context
This commit is contained in:
parent
abca5c6829
commit
a9fa46b60e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user