Skip to content

Commit

Permalink
Merge pull request #36 from chrishalebarnes/master
Browse files Browse the repository at this point in the history
Fix vibe.d v0.7.27 Type Change
  • Loading branch information
dymk committed Mar 26, 2016
2 parents ebef5c8 + d9741b2 commit ddf6244
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/temple/vibe.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ private {
import temple;
import vibe.http.server;
import vibe.textfilter.html;
import vibe.utils.dictionarylist;
import std.stdio;
import std.variant;
}
Expand Down Expand Up @@ -86,9 +87,13 @@ void renderTempleLayoutFile(string layout_file, string partial_file, Ctx = Templ
}

private void copyContextParams(ref TempleContext ctx, ref HTTPServerRequest req) {

if(!req || !(req.params))
return;
static if(is(typeof(req.params) == string[string])) {
if(!req || !(req.params))
return;
} else if(is(typeof(req.params) == DictionaryList!(string, true, 32))) {
if(!req || req.params.length < 1)
return;
}

foreach(key, val; req.params) {
ctx[key] = val;
Expand Down

0 comments on commit ddf6244

Please sign in to comment.