Skip to content

Commit

Permalink
Use the cool stuff of vibe.d 0.8.0-beta.6
Browse files Browse the repository at this point in the history
  • Loading branch information
thaven committed Jun 2, 2017
1 parent eb2b0a7 commit e3134df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"targetType" : "library",
"dependencies" : {
"vibe-d:core" : "~>0.8.0-beta.4",
"vibe-d:core" : "~>0.8.0-beta.6",
"vibe-d:data" : "*",
"vibe-d:http" : "*",
"vibe-d:web" : {
Expand Down
11 changes: 4 additions & 7 deletions source/oauth/webapp.d
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class OAuthWebapp
{
// For assert in oauthSession method
version(assert) () @trusted {
import std.variant : Variant;
req.context["oauth.debug.login.checked"] = cast(Variant) true;
req.context["oauth.debug.login.checked"] = true;
} ();

if (!req.session)
Expand All @@ -54,8 +53,7 @@ class OAuthWebapp
settings ? OAuthSession.load(settings, req.session) : null)
{
() @trusted {
import std.variant : Variant;
req.context["oauth.session"] = cast(Variant) session;
req.context["oauth.session"] = session;
} ();

return true;
Expand Down Expand Up @@ -97,8 +95,7 @@ class OAuthWebapp
{
// For assert in oauthSession method
version(assert) () @trusted {
import std.variant : Variant;
req.context["oauth.debug.login.checked"] = cast(Variant) true;
req.context["oauth.debug.login.checked"] = true;
} ();

auto session = settings.userSession(
Expand Down Expand Up @@ -143,7 +140,7 @@ class OAuthWebapp
in
{
try
assert (req.context.get("oauth.debug.login.checked").get!bool);
assert (req.context.get!bool("oauth.debug.login.checked"));
catch (Exception)
assert(false);
}
Expand Down

0 comments on commit e3134df

Please sign in to comment.