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

25 lines
773 B

using System.IO;
using System.Linq;
using Nancy;
using Nancy.Responses;
using Newtonsoft.Json;
namespace NzbDrone.Api.Extentions
{
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;
}
}
}