var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings=require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class AuthCtl extends CtlBase{
   constructor(){
     super("auth",CtlBase.getServiceName(AuthCtl));
   }
   async saveAuths(pobj,query,req){
     var auths=pobj.auths;
     var xrtn=await this.service.saveAuths(auths,pobj.app_id,pobj.company_id);
     return system.getResult(xrtn);
   }
   async findAuthsByRoles(pobj,query,req){
     var roleids=pobj.roleids;
     var xrtn=await this.service.findAuthsByRole(roleids,pobj.app_id,pobj.company_id);
     return system.getResult(xrtn);
   }
}
module.exports=AuthCtl;
