fix(host): 防止主节点重复并修复 setMaster 权限

Clear all is_master flags before electing new master to prevent multiple master records. Fix setMaster annotation from @auth true to proper @NodeAnotation format so permission node is generated correctly.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
augushong
2026-05-26 18:28:42 +08:00
parent a47bbb2c6a
commit e558a97e91
2 changed files with 11 additions and 0 deletions

View File

@@ -10,4 +10,13 @@ use base\admin\controller\system\HostBase;
*/
class Host extends HostBase
{
/**
* 设置主节点.
*
* @\app\admin\service\annotation\NodeAnotation(title="设置主节点")
*/
public function setMaster()
{
return parent::setMaster();
}
}