public IndexModule(SimpleDatabaseRestoreDbContext dbContext)
        {
            this.dbContext = dbContext;
            this.RequiresWindowsAuthentication();

            Get["/"] = Index;
        }
 public DatabasesModule(SimpleDatabaseRestoreDbContext dbContext)
 {
     this.dbContext = dbContext;
     this.RequiresWindowsAuthentication();
     Get["/servers/{serverName}/add"] = ShowAdd;
     Post["/servers/{serverName}/add"] = Add;
     Get["api/databases/{databaseId}/availableTargets"] = GetAvailableDatabase;
 }
 public GroupsModule(SimpleDatabaseRestoreDbContext dbContext)
 {
     this.dbContext = dbContext;
     this.RequiresWindowsAuthentication();
     Get["/groups"] = ListAllServers;
     Get["/api/groups"] = ListAllServers;
     Get["/groups/add"] = ShowAdd;
     Post["/groups/add"] = Add;
 }
 public PoliciesModule(SimpleDatabaseRestoreDbContext dbContext)
 {
     this.dbContext = dbContext;
     this.RequiresWindowsAuthentication();
     Get["/policies"] = ListAllPolicies;
     Get["/policies/add"] = ShowAdd;
     Post["/policies/add"] = Add;
     Get["/policies/{policyId}/remove"] = Remove;
 }
 public DatabasesServerModule(SimpleDatabaseRestoreDbContext dbContext)
 {
     this.dbContext = dbContext;
     this.RequiresWindowsAuthentication();
     Get["/servers"] = ListAllServers;
     Get["/api/servers"] = ListAllServers;
     Get["/api/servers/{id}/databases"] = ListAllDatabasesForServer;
     Get["/servers/{name}"] = ShowServer;
     Get["/servers/add"] = ShowAdd;
     Post["/servers/add"] = Add;
 }
        public ResquestRestoreModule(IRestoreDatabaseService restoreDatabaseService, SimpleDatabaseRestoreDbContext dbContext, IDatabaseBackupFolderScannerService folderScannerService)
        {
            this.folderScannerService = folderScannerService;
            this.restoreDatabaseService = restoreDatabaseService;
            this.dbContext = dbContext;
            this.RequiresWindowsAuthentication();
            
            Get["/RequestRestore"] = ConfirmRestoreRequest;

            Post["/Restore"] = Restore;
        }