Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Radarr/src/commit/1186fcf04e4c2ca0a2e7001007c272c9761e3cf5/NzbDrone.Services.Api/Extensions/RequestExtensions.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
Radarr/NzbDrone.Services.Api/Extensions/RequestExtensions.cs

25 lines
782 B

using System.IO;
using System.Linq;
using Nancy;
using Nancy.Responses;
using Newtonsoft.Json;
namespace NzbDrone.Services.Api.Extensions
{
public static class JsonExtensions
{
public static T FromJson<T>(this Stream body)
{
var reader = new StreamReader(body, true);
body.Position = 0;
var value = reader.ReadToEnd();
return JsonConvert.DeserializeObject<T>(value, Serializer.Settings);
}
public static JsonResponse<TModel> AsResponse<TModel>(this TModel model, HttpStatusCode statusCode = HttpStatusCode.OK)
{
var jsonResponse = new JsonResponse<TModel>(model, new NancyJsonSerializer()) { StatusCode = statusCode };
return jsonResponse;
}
}
}