2013-04-27 05:03:34 +03:00
|
|
|
using Nancy;
|
2013-05-22 03:58:57 +03:00
|
|
|
using Nancy.Security;
|
2013-01-20 03:19:27 +03:00
|
|
|
|
2013-01-20 04:37:48 +03:00
|
|
|
namespace NzbDrone.Api
|
2013-01-20 03:19:27 +03:00
|
|
|
{
|
|
|
|
public abstract class NzbDroneApiModule : NancyModule
|
|
|
|
{
|
|
|
|
protected NzbDroneApiModule(string resource)
|
2013-01-20 04:37:48 +03:00
|
|
|
: base("/api/" + resource.Trim('/'))
|
2013-01-20 03:19:27 +03:00
|
|
|
{
|
2013-05-22 03:58:57 +03:00
|
|
|
this.RequiresAuthentication();
|
2013-01-20 04:37:48 +03:00
|
|
|
Options["/"] = x => new Response();
|
2013-01-20 03:19:27 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|