mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
respErr with custom http code
This commit is contained in:
parent
32fca05210
commit
a0be08d559
1 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
import std/httpcore
|
||||
|
||||
template H*(s: string): untyped =
|
||||
$request.headers[s]
|
||||
|
||||
|
@ -8,3 +10,7 @@ template reqInfo*: string =
|
|||
template respErr*(s: string): untyped =
|
||||
error s & reqInfo
|
||||
resp Http403, s
|
||||
|
||||
template respErr*(e: HttpCode, s: string): untyped =
|
||||
error s & reqInfo
|
||||
resp e, s
|
||||
|
|
Loading…
Add table
Reference in a new issue