...
|
...
|
@@ -49,6 +49,7 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo |
|
|
model=callback.apply(local, args);
|
|
|
}
|
|
|
if(view){
|
|
|
console.log("view1");
|
|
|
res.render(view,local,me.client(res,view,model,clientmodel));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -78,6 +79,7 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo |
|
|
if (model&&model.readable) {
|
|
|
model.pipe(res);
|
|
|
}else if (view && method == "get" && !req.xhr) {
|
|
|
console.log("view2");
|
|
|
res.render(view, local, me.client(res, view, model,clientmodel));
|
|
|
} else {
|
|
|
res.json(model);
|
...
|
...
|
|