mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
First crack the API
This commit is contained in:
parent
64468cd9ed
commit
b366f8fadc
13 changed files with 139 additions and 24 deletions
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using Ninject;
|
||||
using NzbDrone.Api.Exceptions;
|
||||
using NzbDrone.Api.Helpers;
|
||||
using NzbDrone.Core.Providers.Core;
|
||||
using ServiceStack.ServiceHost;
|
||||
using ServiceStack.ServiceInterface;
|
||||
|
@ -21,10 +22,10 @@ namespace NzbDrone.Api.Filters
|
|||
public void RequestFilter(IHttpRequest req, IHttpResponse res, object requestDto)
|
||||
{
|
||||
//Verify the API Key here
|
||||
var apikey = ((IApiRequest)requestDto).ApiKey;
|
||||
var apikey = req.GetApiKey();
|
||||
|
||||
if (String.IsNullOrWhiteSpace(apikey))
|
||||
throw new InvalidApiKeyException();
|
||||
//if (String.IsNullOrWhiteSpace(apikey))
|
||||
//throw new InvalidApiKeyException();
|
||||
}
|
||||
|
||||
public IHasRequestFilter Copy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue