mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
fixed broken tests.
This commit is contained in:
parent
4188946395
commit
932012d7f9
@ -31,7 +31,7 @@ private Response RunCommand(CommandResource resource)
|
|||||||
dynamic command = Request.Body.FromJson(commandType);
|
dynamic command = Request.Body.FromJson(commandType);
|
||||||
_messageAggregator.PublishCommand(command);
|
_messageAggregator.PublishCommand(command);
|
||||||
|
|
||||||
return resource.AsResponse();
|
return resource.AsResponse(HttpStatusCode.Created);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using NzbDrone.Core.RootFolders;
|
using NzbDrone.Core.RootFolders;
|
||||||
|
using NzbDrone.Api.Mapping;
|
||||||
|
|
||||||
namespace NzbDrone.Api.RootFolders
|
namespace NzbDrone.Api.RootFolders
|
||||||
{
|
{
|
||||||
@ -12,10 +14,16 @@ public RootFolderModule(IRootFolderService rootFolderService)
|
|||||||
_rootFolderService = rootFolderService;
|
_rootFolderService = rootFolderService;
|
||||||
|
|
||||||
GetResourceAll = GetRootFolders;
|
GetResourceAll = GetRootFolders;
|
||||||
|
GetResourceById = GetRootFolder;
|
||||||
CreateResource = CreateRootFolder;
|
CreateResource = CreateRootFolder;
|
||||||
DeleteResource = DeleteFolder;
|
DeleteResource = DeleteFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private RootFolderResource GetRootFolder(int id)
|
||||||
|
{
|
||||||
|
return _rootFolderService.Get(id).InjectTo<RootFolderResource>();
|
||||||
|
}
|
||||||
|
|
||||||
private int CreateRootFolder(RootFolderResource rootFolderResource)
|
private int CreateRootFolder(RootFolderResource rootFolderResource)
|
||||||
{
|
{
|
||||||
return GetNewId<RootFolder>(_rootFolderService.Add, rootFolderResource);
|
return GetNewId<RootFolder>(_rootFolderService.Add, rootFolderResource);
|
||||||
|
Loading…
Reference in New Issue
Block a user