UNPKG

flexbiz-server

Version:

Flexible Server

4 lines (3 loc) 701 B
'use strict';const model=global.getModel("sotinhkh"),qts=global.getModel("qts"),controller=require("../../controllers/controller"),async=require("async"); module.exports=function($contr_router$$){$contr_router$$=new controller($contr_router$$,model,"dckhauhaots",{sort:{nam:1,thang:1,so_the_ts:1}});$contr_router$$.view=function($user$$,$items$$,$fn$$){let $id_app$$=$user$$.current_id_app;async.series({ts:function($callback$$){$items$$.joinModel($id_app$$,qts,[{akey:"id_ts",bkey:"_id",fields:[{name:"ten_ts",value:"ten_ts"},{name:"so_the_ts",value:"so_the_ts"}]}],function(){$callback$$()})}},function($error$$){if($error$$)return $fn$$($error$$);$fn$$(null, $items$$)})};$contr_router$$.route()};