Go CLI: Fix show admin server and api server (#16382)

### What problem does this PR solve?

RAGFlow(api/default)> show admin server;

RAGFlow(api/default)> show api server 'default';

RAGFlow(admin)> show admin server;

RAGFlow(admin)> show api server 'default';

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-06-26 19:16:14 +08:00
committed by GitHub
parent ca96d61e73
commit f763044889
8 changed files with 484 additions and 234 deletions

View File

@@ -1101,11 +1101,11 @@ func (c *CLI) CommonShowCurrentCommand(cmd *Command) (ResponseIf, error) {
return result, nil
}
func (c *CLI) ShowAdminServer(cmd *Command) (ResponseIf, error) {
func (c *CLI) CommonShowAdminServerCommand(cmd *Command) (ResponseIf, error) {
return c.GetAdminServerInfo()
}
func (c *CLI) ShowAPIServer(cmd *Command) (ResponseIf, error) {
func (c *CLI) CommonShowAPIServerCommand(cmd *Command) (ResponseIf, error) {
apiServerName, ok := cmd.Params["api_server_name"].(string)
if !ok {
return nil, fmt.Errorf("api_server_name not provided")
@@ -1302,7 +1302,7 @@ func (c *CLI) DeleteAdminServer(cmd *Command) (ResponseIf, error) {
return &result, nil
}
func (c *CLI) SaveServerConfig(cmd *Command) (ResponseIf, error) {
func (c *CLI) CommonSaveServerConfigCommand(cmd *Command) (ResponseIf, error) {
switch c.Config.CLIMode {
case AdminMode: