index + default args

This commit is contained in:
tmshv committed 2016-02-24 18:37:03 +03:00
1 parent 0c005712a1
commit f93c258d14
1 file changed
+1 -3
+1 -3
View File
@@ -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);