1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

fixed URL when adding an indexer

This commit is contained in:
Mark McDowall 2014-01-07 17:29:43 -08:00
parent 332136bc6f
commit e00b216eef
2 changed files with 12 additions and 12 deletions

View File

@ -43,27 +43,27 @@ private TProviderResource GetProviderById(int id)
private List<TProviderResource> GetAll()
{
var indexerDefinitions = _providerFactory.All();
var providerDefinitions = _providerFactory.All();
var result = new List<TProviderResource>(indexerDefinitions.Count);
var result = new List<TProviderResource>(providerDefinitions.Count);
foreach (var definition in indexerDefinitions)
foreach (var definition in providerDefinitions)
{
var indexerResource = new TProviderResource();
indexerResource.InjectFrom(definition);
indexerResource.Fields = SchemaBuilder.ToSchema(definition.Settings);
var providerResource = new TProviderResource();
providerResource.InjectFrom(definition);
providerResource.Fields = SchemaBuilder.ToSchema(definition.Settings);
result.Add(indexerResource);
result.Add(providerResource);
}
return result;
}
private int CreateProvider(TProviderResource indexerResource)
private int CreateProvider(TProviderResource providerResource)
{
var indexer = GetDefinition(indexerResource);
indexer = _providerFactory.Create(indexer);
return indexer.Id;
var provider = GetDefinition(providerResource);
provider = _providerFactory.Create(provider);
return provider.Id;
}
private void UpdateProvider(TProviderResource providerResource)

View File

@ -33,7 +33,7 @@ define(
schemaCollection.url = StatusModel.get('urlBase') + '/api/indexer/schema';
schemaCollection.fetch({
success: function (collection) {
collection.url = './api/indexer';
collection.url = StatusModel.get('urlBase') + '/api/indexer';
var model = _.first(collection.models);
model.set({