mirror of
https://github.com/hkalexling/Mango.git
synced 2026-03-20 00:00:48 -04:00
- group config/library/storage into context
This commit is contained in:
@@ -12,7 +12,7 @@ macro get_username(env)
|
||||
# if the request gets here, its has gone through the auth handler, and
|
||||
# we can be sure that a valid token exists, so we can use not_nil! here
|
||||
cookie = {{env}}.request.cookies.find { |c| c.name == "token" }.not_nil!
|
||||
(storage.verify_token cookie.value).not_nil!
|
||||
(@context.storage.verify_token cookie.value).not_nil!
|
||||
end
|
||||
|
||||
macro send_json(env, json)
|
||||
|
||||
Reference in New Issue
Block a user