mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Move to version string also for /Api/ASF/Update
This commit is contained in:
2
ASF-ui
2
ASF-ui
Submodule ASF-ui updated: a8cf73abe4...7271f9bdd2
@@ -124,15 +124,15 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
||||
/// Makes ASF update itself.
|
||||
/// </summary>
|
||||
[HttpPost("Update")]
|
||||
[ProducesResponseType(typeof(GenericResponse<Version>), (int) HttpStatusCode.OK)]
|
||||
public async Task<ActionResult<GenericResponse<Version>>> UpdatePost() {
|
||||
[ProducesResponseType(typeof(GenericResponse<string>), (int) HttpStatusCode.OK)]
|
||||
public async Task<ActionResult<GenericResponse<string>>> UpdatePost() {
|
||||
(bool success, string message, Version version) = await Actions.Update().ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrEmpty(message)) {
|
||||
message = success ? Strings.Success : Strings.WarningFailed;
|
||||
}
|
||||
|
||||
return Ok(new GenericResponse<Version>(success, message, version));
|
||||
return Ok(new GenericResponse<string>(success, message, version.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user