First crack the API

This commit is contained in:
Mark McDowall 2012-11-03 18:39:29 -07:00
commit b366f8fadc
13 changed files with 139 additions and 24 deletions

View file

@ -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()