1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

improve webfront command error feedback

This commit is contained in:
RaidMax
2022-10-25 14:52:12 -05:00
parent a2ccefd89d
commit 5112d88ce2
4 changed files with 18 additions and 6 deletions

View File

@ -248,7 +248,9 @@ namespace WebfrontCore.Controllers
}
var server = Manager.GetServers().First();
return Ok(await _remoteCommandService.Execute(Client.ClientId, targetId, data, inputs.Values.Select(input => input), server));
var (success, result) = await _remoteCommandService.ExecuteWithResult(Client.ClientId, targetId, data,
inputs.Values.Select(input => input), server);
return success ? Ok(result) : BadRequest(result);
}
public IActionResult BanForm()