fix: main layout file serving
This commit is contained in:
1 parent
bd4c166903
commit
a0255d9758
6 files changed
+60
-76
No files matched your search
+3
-5
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user