Commit 9a6967b6 by 宋毅

tj

parent 5c06e9c5
......@@ -7,11 +7,7 @@ class AccessAuthAPI extends APIBase {
}
async getTokenByHosts(pobj, qobj, req) {
var app_hosts = pobj.app_hosts || "";
if (!app_hosts) {
return system.getResult(null, "app_hosts can not be empty !");
}
var result = await this.opPlatformUtils.getReqTokenByHosts(app_hosts);
var result = await this.opPlatformUtils.getReqTokenByHosts(pobj);
return result;
}
......
......@@ -212,9 +212,10 @@ class OpPlatformUtils {
}
//------------------------新的方式------------------------------------------------------------------------------------
async getReqTokenByHosts(app_hosts) {
async getReqTokenByHosts(actionBody) {
var cacheManager = system.getObject("db.common.cacheManager");
var result = await cacheManager["AppTokenByHostsCache"].cache(app_hosts, null, system.shortExTime);
var inputkey = actionBody.reqType == "hosts" ? actionBody.appHosts : actionBody.appkey;
var result = await cacheManager["AppTokenByHostsCache"].cache(inputkey, actionBody, system.shortExTime);
return result;
}
async getReqUserPinByChannelUserId(pobj) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment