...
 
Commits (6)
import { Cookie } from '../../services/cookie';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { environment } from '../../../environments/environment';
/**
* API Class
......@@ -68,6 +69,7 @@ export class MindsHttpClient {
const headers = new HttpHeaders({
'X-XSRF-TOKEN': XSRF_TOKEN,
'X-VERSION': environment.version,
});
return Object.assign(options, {
......
......@@ -122,6 +122,7 @@ export class NewsfeedBoostRotatorComponent {
load() {
try {
this.feedsService.clear(); // Fresh each time
this.feedsService
.setEndpoint('api/v2/boost/feed')
.setParams({
......@@ -262,8 +263,7 @@ export class NewsfeedBoostRotatorComponent {
if (this.currentPosition + 1 > this.boosts.length - 1) {
//this.currentPosition = 0;
try {
this.feedsService.fetch();
this.feedsService.loadMore();
this.load();
this.currentPosition++;
} catch (e) {
this.currentPosition = 0;
......
......@@ -24,7 +24,7 @@
></minds-activity>
<m-newsfeed--boost-rotator
interval="4"
interval="3"
*ngIf="showBoostRotator"
></m-newsfeed--boost-rotator>
......
import { Cookie } from '../cookie';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { environment } from '../../../environments/environment';
/**
* API Class
......@@ -175,6 +176,7 @@ export class Client {
const headers = new HttpHeaders({
'X-XSRF-TOKEN': XSRF_TOKEN,
'X-VERSION': environment.version,
});
return Object.assign(options, {
......