Settings wired up

This commit is contained in:
Mark McDowall
2013-03-03 16:09:43 -08:00
parent 9a738e3a65
commit 50f6ec4fc6
23 changed files with 480 additions and 42 deletions

View File

@@ -1,4 +1,6 @@
using System.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using Nancy;
using NzbDrone.Api.Extensions;
using NzbDrone.Core.Configuration;
@@ -18,8 +20,12 @@ namespace NzbDrone.Api.Settings
private Response GetAllSettings()
{
var settings = _configService.All();
return settings.AsResponse();
var collection = Request.Query.Collection;
if(collection.HasValue && Boolean.Parse(collection.Value))
return _configService.All().AsResponse();
return _configService.All().ToDictionary(c => c.Key, c => c.Value).AsResponse();
}
}
}