fix(core): update
This commit is contained in:
parent
8a78cc6831
commit
3170da0303
@ -5,7 +5,13 @@ export class SitemapNews {
|
||||
|
||||
constructor(optionsArg: {}) {}
|
||||
|
||||
public async readAndAddFromRssFeed(urlArg: string) {
|
||||
public async readAndAddFromRssFeedString(feedStringArg: string) {
|
||||
const smartfeedInstance = new plugins.smartfeed.Smartfeed();
|
||||
const parsedFeed = await smartfeedInstance.parseFeedFromString(feedStringArg);
|
||||
this.items = this.items.concat(parsedFeed.items);
|
||||
}
|
||||
|
||||
public async readAndAddFromRssFeedUrl(urlArg: string) {
|
||||
const smartfeedInstance = new plugins.smartfeed.Smartfeed();
|
||||
const parsedFeed = await smartfeedInstance.parseFeedFromUrl(urlArg);
|
||||
this.items = this.items.concat(parsedFeed.items);
|
||||
|
@ -11,7 +11,7 @@ export class SmartSitemap {
|
||||
*/
|
||||
public async createSitemapNewsFromFeedUrl(feedUrlArg: string): Promise<string> {
|
||||
const sitemapNewsInstance = new SitemapNews({});
|
||||
await sitemapNewsInstance.readAndAddFromRssFeed(feedUrlArg);
|
||||
await sitemapNewsInstance.readAndAddFromRssFeedUrl(feedUrlArg);
|
||||
return sitemapNewsInstance.exportSitemapXml();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user