fixed config post issue

pull/3113/head
kay.one 14 years ago
parent d7bae9135c
commit 1620721efe

@ -68,6 +68,9 @@ namespace NzbDrone.Core.Controllers
private void SetValue(string key, string value) private void SetValue(string key, string value)
{ {
if (String.IsNullOrEmpty(key)) throw new ArgumentOutOfRangeException("key");
if (value== null) throw new ArgumentNullException("key");
_logger.DebugFormat("Writing Setting to file. Key:'{0}' Value:'{1}'", key, value); _logger.DebugFormat("Writing Setting to file. Key:'{0}' Value:'{1}'", key, value);
_sonicRepo.Add(new Config { Key = key, Value = value }); _sonicRepo.Add(new Config { Key = key, Value = value });

Binary file not shown.

Binary file not shown.

@ -25,7 +25,7 @@ namespace NzbDrone.Web.Controllers
} }
[HttpPost] [HttpPost]
public ActionResult Save(SettingsModel model) public ActionResult Index(SettingsModel model)
{ {
if (ModelState.IsValid) if (ModelState.IsValid)
{ {

@ -1,6 +1,6 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NzbDrone.Web.Models.SettingsModel>" %> <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NzbDrone.Web.Models.SettingsModel>" %>
<%@ Import Namespace="NzbDrone.Web.Controllers" %>
<%@ Import Namespace="NzbDrone.Web.Controllers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Index Index
</asp:Content> </asp:Content>
@ -9,6 +9,7 @@
Settings</h2> Settings</h2>
<% using (Html.BeginForm()) <% using (Html.BeginForm())
{ %> { %>
<%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>
<div> <div>
<fieldset> <fieldset>
<legend>General</legend> <legend>General</legend>

Loading…
Cancel
Save