Remove SCUM server-management client path
This commit is contained in:
@@ -1215,6 +1215,9 @@ func (svc *CoreService) executeBridgeRemoteAccessRequest(sessionID string, base
|
||||
inputs[strings.TrimPrefix(key, "input.")] = value
|
||||
}
|
||||
}
|
||||
if capability == domain.JobCapabilityRemoteRunRCONCommand && strings.TrimSpace(inputs["command"]) != "" {
|
||||
return svc.executeBridgeSourceRCONCommand(sessionID, base, payload, inputs)
|
||||
}
|
||||
if capability == domain.JobCapabilityRemoteRunDBSQLiteQuery {
|
||||
templateKey := strings.TrimSpace(inputs["templateKey"])
|
||||
if templateKey == "" {
|
||||
@@ -1274,6 +1277,32 @@ func (svc *CoreService) executeBridgeRemoteAccessRequest(sessionID string, base
|
||||
return base
|
||||
}
|
||||
|
||||
func (svc *CoreService) executeBridgeSourceRCONCommand(sessionID string, base domain.PluginBridgeExecuteResponse, payload map[string]string, inputs map[string]string) domain.PluginBridgeExecuteResponse {
|
||||
dispatch, err := svc.DispatchSourceRCONCommandForSession(sessionID, domain.SourceRCONCommandRequest{
|
||||
ServerInstanceID: base.ServerInstanceID,
|
||||
Kind: domain.SourceRCONCommandKindCommand,
|
||||
Command: inputs["command"],
|
||||
IdempotencyKey: defaultBridgeValue(payload["idempotencyKey"], base.RequestID),
|
||||
})
|
||||
if err != nil {
|
||||
return bridgeExecutionError(base, err)
|
||||
}
|
||||
targetKey := strings.TrimSpace(payload["targetKey"])
|
||||
if job, getErr := svc.store.Jobs().Get(dispatch.JobID); getErr == nil && strings.TrimSpace(job.TargetKey) != "" {
|
||||
targetKey = job.TargetKey
|
||||
}
|
||||
base.Status = "queued"
|
||||
base.Result = map[string]string{
|
||||
"jobId": dispatch.JobID,
|
||||
"state": dispatch.Status,
|
||||
"capability": domain.JobCapabilityRemoteRunRCONCommand,
|
||||
"targetKey": targetKey,
|
||||
"serverInstanceId": dispatch.ServerInstanceID,
|
||||
"adapterKind": string(domain.RemoteAdapterRCON),
|
||||
}
|
||||
return base
|
||||
}
|
||||
|
||||
func findBridgeQueryTemplate(plugin domain.GamePlugin, routeKey string, templateKey string) (domain.GameClientBridgeQueryTemplateDeclaration, string) {
|
||||
pageFound := false
|
||||
pageAllowsTemplate := false
|
||||
|
||||
Reference in New Issue
Block a user