mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
added missing GetResourceById methods.
This commit is contained in:
parent
0fa4934358
commit
317586c102
3 changed files with 27 additions and 3 deletions
|
@ -137,6 +137,7 @@ namespace NzbDrone.Api.REST
|
|||
private get { return _createResource; }
|
||||
set
|
||||
{
|
||||
EnsureGetByIdRoute();
|
||||
_createResource = value;
|
||||
Post[ROOT_ROUTE] = options =>
|
||||
{
|
||||
|
@ -147,6 +148,15 @@ namespace NzbDrone.Api.REST
|
|||
}
|
||||
}
|
||||
|
||||
private void EnsureGetByIdRoute()
|
||||
{
|
||||
if (GetResourceById == null)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"GetResourceById route must be defined before defining Create/Update routes.");
|
||||
}
|
||||
}
|
||||
|
||||
protected Action<TResource> UpdateResource
|
||||
{
|
||||
private get { return _updateResource; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue