From 932012d7f9b41ff08f34e30cea3ea033791ec44f Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 25 Aug 2013 22:25:56 -0700 Subject: [PATCH] fixed broken tests. --- NzbDrone.Api/Commands/CommandModule.cs | 2 +- NzbDrone.Api/RootFolders/RootFolderModule.cs | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Api/Commands/CommandModule.cs b/NzbDrone.Api/Commands/CommandModule.cs index 836427cca..371483cc3 100644 --- a/NzbDrone.Api/Commands/CommandModule.cs +++ b/NzbDrone.Api/Commands/CommandModule.cs @@ -31,7 +31,7 @@ namespace NzbDrone.Api.Commands dynamic command = Request.Body.FromJson(commandType); _messageAggregator.PublishCommand(command); - return resource.AsResponse(); + return resource.AsResponse(HttpStatusCode.Created); } } } \ No newline at end of file diff --git a/NzbDrone.Api/RootFolders/RootFolderModule.cs b/NzbDrone.Api/RootFolders/RootFolderModule.cs index bb68ef289..5c13a736c 100644 --- a/NzbDrone.Api/RootFolders/RootFolderModule.cs +++ b/NzbDrone.Api/RootFolders/RootFolderModule.cs @@ -1,5 +1,7 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using NzbDrone.Core.RootFolders; +using NzbDrone.Api.Mapping; namespace NzbDrone.Api.RootFolders { @@ -12,10 +14,16 @@ namespace NzbDrone.Api.RootFolders _rootFolderService = rootFolderService; GetResourceAll = GetRootFolders; + GetResourceById = GetRootFolder; CreateResource = CreateRootFolder; DeleteResource = DeleteFolder; } + private RootFolderResource GetRootFolder(int id) + { + return _rootFolderService.Get(id).InjectTo(); + } + private int CreateRootFolder(RootFolderResource rootFolderResource) { return GetNewId(_rootFolderService.Add, rootFolderResource);