index + default args
This commit is contained in:
1 parent
0c005712a1
commit
f93c258d14
1 file changed
+1
-3
+1
-3
@@ -45,9 +45,7 @@ export function accepts(routes, def) {
|
||||
};
|
||||
}
|
||||
|
||||
export function index(filename) {
|
||||
if (!filename) filename = config['defaultIndex'];
|
||||
|
||||
export function index(filename = config['defaultIndex']) {
|
||||
return function *() {
|
||||
this.type = 'text/html';
|
||||
this.body = fs.createReadStream(filename);
|
||||
|
||||
Reference in new issue
Block a user