fixed config post issue

This commit is contained in:
kay.one 2010-09-23 22:37:48 -07:00
parent d7bae9135c
commit 1620721efe
5 changed files with 6 additions and 2 deletions

View File

@ -68,6 +68,9 @@ namespace NzbDrone.Core.Controllers
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);
_sonicRepo.Add(new Config { Key = key, Value = value });

Binary file not shown.

Binary file not shown.

View File

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

View File

@ -1,6 +1,6 @@
<%@ 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">
Index
</asp:Content>
@ -9,6 +9,7 @@
Settings</h2>
<% using (Html.BeginForm())
{ %>
<%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>
<div>
<fieldset>
<legend>General</legend>