mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
added missing GetResourceById methods.
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user