Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/src/commit/9428d686675c991d82907d9e927d4688f44980ef/NzbDrone.Services/NzbDrone.Services.Service/Controllers/ReportingController.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.

71 lines
1.8 KiB

using System;
using System.Linq;
using System.Web.Mvc;
using NLog;
using NzbDrone.Common;
using NzbDrone.Common.Contract;
using NzbDrone.Services.Service.Repository.Reporting;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Controllers
{
public class ReportingController : Controller
{
private readonly IDatabase _database;
private readonly ExceptionController _exceptionController;
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
private const string OK = "OK";
public ReportingController(IDatabase database, ExceptionController exceptionController)
{
_database = database;
_exceptionController = exceptionController;
}
[HttpPost]
public JsonResult ParseError(ParseErrorReport parseErrorReport)
{
try
{
logger.Trace(parseErrorReport.NullSafe());
if (ParseErrorExists(parseErrorReport.Title))
return Json(OK);
var row = new ParseErrorRow();
row.LoadBase(parseErrorReport);
row.Title = parseErrorReport.Title;
_database.Insert(row);
return Json(OK);
}
catch (Exception e)
{
logger.FatalException("Error has occurred while saving parse report", e);
if (!parseErrorReport.IsProduction)
{
throw;
}
}
return new JsonResult();
}
private bool ParseErrorExists(string title)
{
return _database.Exists<ParseErrorRow>(title);
}
[HttpPost]
public JsonResult ReportException()
{
return new JsonResult();
}
}
}