mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 实时刷新AccessToken权限
This commit is contained in:
parent
cbdfab5f52
commit
1e5738ab09
@ -138,7 +138,7 @@ class App extends Base {
|
|||||||
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR);
|
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR);
|
||||||
}
|
}
|
||||||
$appInfo = AdminApp::get($id);
|
$appInfo = AdminApp::get($id);
|
||||||
cache('AccessToken:' . $appInfo['app_secret'], null);
|
cache('AccessToken:Easy:' . $appInfo['app_secret'], null);
|
||||||
if($oldWiki = cache('WikiLogin:' . $id)) {
|
if($oldWiki = cache('WikiLogin:' . $id)) {
|
||||||
cache('WikiLogin:' . $oldWiki, null);
|
cache('WikiLogin:' . $oldWiki, null);
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ class App extends Base {
|
|||||||
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR);
|
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR);
|
||||||
}
|
}
|
||||||
$appInfo = AdminApp::get($postData['id']);
|
$appInfo = AdminApp::get($postData['id']);
|
||||||
cache('AccessToken:' . $appInfo['app_secret'], null);
|
cache('AccessToken:Easy:' . $appInfo['app_secret'], null);
|
||||||
if($oldWiki = cache('WikiLogin:' . $postData['id'])) {
|
if($oldWiki = cache('WikiLogin:' . $postData['id'])) {
|
||||||
cache('WikiLogin:' . $oldWiki, null);
|
cache('WikiLogin:' . $oldWiki, null);
|
||||||
}
|
}
|
||||||
@ -194,7 +194,7 @@ class App extends Base {
|
|||||||
return $this->buildFailed(ReturnCode::EMPTY_PARAMS, '缺少必要参数');
|
return $this->buildFailed(ReturnCode::EMPTY_PARAMS, '缺少必要参数');
|
||||||
}
|
}
|
||||||
$appInfo = AdminApp::get($id);
|
$appInfo = AdminApp::get($id);
|
||||||
cache('AccessToken:' . $appInfo['app_secret'], null);
|
cache('AccessToken:Easy:' . $appInfo['app_secret'], null);
|
||||||
|
|
||||||
AdminApp::destroy($id);
|
AdminApp::destroy($id);
|
||||||
if($oldWiki = cache('WikiLogin:' . $id)) {
|
if($oldWiki = cache('WikiLogin:' . $id)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user