fix: main layout file serving

This commit is contained in:
tmshv committed 2015-07-01 16:25:30 +03:00
1 parent bd4c166903
commit a0255d9758
6 files changed
+60 -76

No files matched your search

+3 -5
View File
@@ -17,18 +17,16 @@ function accepts(routes, def) {
if (types.length) {
var type = types[0];
yield routes[type].apply(this, arguments);
} else if(def){
} else if (def) {
yield def;
}else{
} else {
this.status = 406;
}
};
}
function index(filename) {
if (!filename){
filename = path.join(__dirname, "..", config.defaultIndex);
}
if (!filename) filename = config['defaultIndex'];
return function *() {
this.type = "text/html";