var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings=require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
class AuthCtl extends CtlBase{
   constructor(){
     super("auth",CtlBase.getServiceName(AuthCtl));
   }
   async saveAuths(qobj,query,req){
     var auths=qobj.aus;
     var xrtn=await this.service.saveAuths(auths,req.appid,req.tanentid);
     return system.getResult(xrtn);
   }
   async findAuthsByRole(qobj,query,req){
     var rolecodestrs=qobj.rolecode;
     var xrtn=await this.service.findAuthsByRole(rolecodestrs,req.appid,req.tanentid);
     return system.getResult(xrtn);
   }
}
module.exports=AuthCtl;
