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

huge commit for webfront facelift

This commit is contained in:
RaidMax
2022-04-19 18:43:58 -05:00
parent 7b78e0803a
commit d5b4c60e5a
105 changed files with 2981 additions and 2545 deletions

View File

@ -34,11 +34,11 @@ namespace WebfrontCore.Controllers
return View(activeServers);
}
public async Task<IActionResult> ExecuteAsync(long serverId, string command)
public async Task<IActionResult> Execute(long serverId, string command)
{
var server = Manager.GetServers().First(s => s.EndPoint == serverId);
var client = new EFClient()
var client = new EFClient
{
ClientId = Client.ClientId,
Level = Client.Level,
@ -50,7 +50,7 @@ namespace WebfrontCore.Controllers
}
};
var remoteEvent = new GameEvent()
var remoteEvent = new GameEvent
{
Type = GameEvent.EventType.Command,
Data = command.StartsWith(_appconfig.CommandPrefix) ||
@ -97,15 +97,15 @@ namespace WebfrontCore.Controllers
{
response = new[]
{
new CommandResponseInfo()
new CommandResponseInfo
{
ClientId = client.ClientId,
Response = Utilities.CurrentLocalization.LocalizationIndex["COMMADS_RESTART_SUCCESS"]
}
};
}
return View("_Response", response);
return remoteEvent.Failed ? StatusCode(400, response) : Ok(response);
}
}
}
}