mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-13 00:28:10 -05:00
improve webfront command error feedback
This commit is contained in:
@ -45,10 +45,11 @@ namespace WebfrontCore.Controllers
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var server = Manager.GetServers().First(s => s.EndPoint == serverId);
|
||||
var response = await _remoteCommandService.Execute(Client.ClientId, null, command, Enumerable.Empty<string>(), server);
|
||||
return !response.Any() ? StatusCode(400, response) : Ok(response);
|
||||
var (success, response) = await _remoteCommandService.ExecuteWithResult(Client.ClientId, null, command,
|
||||
Enumerable.Empty<string>(), server);
|
||||
return success ? Ok(response) : StatusCode(400, response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user