mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Mark /Api/WWW/Send as obsolete
This commit is contained in:
@@ -136,6 +136,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
||||
/// </remarks>
|
||||
[Consumes("application/json")]
|
||||
[HttpPost("Send")]
|
||||
[Obsolete("ASF-ui should switch to new /Api/WWW/Github/{Release|Wiki} endpoints.")]
|
||||
[ProducesResponseType(typeof(GenericResponse<string>), (int) HttpStatusCode.OK)]
|
||||
[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)]
|
||||
[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.ServiceUnavailable)]
|
||||
@@ -148,6 +149,8 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
||||
throw new InvalidOperationException(nameof(ASF.WebBrowser));
|
||||
}
|
||||
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningDeprecated, nameof(SendPost), nameof(GitHubReleaseGet) + "/" + nameof(GitHubWikiHistoryGet) + "/" + nameof(GitHubWikiPageGet)));
|
||||
|
||||
if (string.IsNullOrEmpty(request.URL) || !Uri.TryCreate(request.URL, UriKind.Absolute, out Uri? uri) || !uri.Scheme.Equals(Uri.UriSchemeHttps, StringComparison.OrdinalIgnoreCase)) {
|
||||
return BadRequest(new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsInvalid, nameof(request.URL))));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user