catalog index
This commit is contained in:
@ -23,9 +23,9 @@ namespace isnd.Services
|
||||
IOptions<IsndSettings> siteConfigOptionsOptions)
|
||||
{
|
||||
this.dbContext = dbContext;
|
||||
isndSettings = siteConfigOptionsOptions.Value;
|
||||
extApiUrl = isndSettings.ExternalUrl + "/package";
|
||||
CurrentCatalogIndex = GetCatalogIndex();
|
||||
pmConfigOptions = siteConfigOptionsOptions.Value;
|
||||
extApiUrl = pmConfigOptions.ExternalUrl + "/package";
|
||||
}
|
||||
|
||||
|
||||
@ -138,7 +138,7 @@ namespace isnd.Services
|
||||
public static CatalogIndex CurrentCatalogIndex { get; protected set; }
|
||||
public static List<Page> CurrentCatalogPages { get; protected set; }
|
||||
|
||||
private IsndSettings pmConfigOptions;
|
||||
private IsndSettings isndSettings;
|
||||
private string extApiUrl;
|
||||
|
||||
public virtual CatalogIndex GetCatalogIndex()
|
||||
@ -157,7 +157,7 @@ namespace isnd.Services
|
||||
var oldPages = CurrentCatalogPages;
|
||||
CurrentCatalogIndex = new CatalogIndex
|
||||
{
|
||||
|
||||
Id = extApiUrl
|
||||
};
|
||||
CurrentCatalogPages = new List<Page>();
|
||||
|
||||
@ -165,17 +165,17 @@ namespace isnd.Services
|
||||
Commit last = null;
|
||||
PageRef pageRef = null;
|
||||
Page page = null;
|
||||
i = pmConfigOptions.CatalogPageLen;
|
||||
i = isndSettings.CatalogPageLen;
|
||||
foreach (var commit in scope)
|
||||
{
|
||||
if (i >= this.pmConfigOptions.CatalogPageLen)
|
||||
if (i >= this.isndSettings.CatalogPageLen)
|
||||
{
|
||||
page = new Page
|
||||
{
|
||||
Parent = pmConfigOptions.ExternalUrl + "/package",
|
||||
Parent = isndSettings.ExternalUrl + "/package",
|
||||
CommitId = commit.CommitId,
|
||||
CommitTimeStamp = commit.CommitTimeStamp,
|
||||
Id = this.pmConfigOptions.ExternalUrl + "/package/index-" + p++
|
||||
Id = this.isndSettings.ExternalUrl + "/package/index-" + p++
|
||||
|
||||
};
|
||||
CurrentCatalogPages.Add(page);
|
||||
|
Reference in New Issue
Block a user