Commit a44912e0 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix(news): 'a-la-une' tag was creating bug in other news display. Multiple...

fix(news): 'a-la-une' tag was creating bug in other news display. Multiple 'a-la-une' tag is now possible.
parent d8a36d45
......@@ -150,6 +150,11 @@ export class PostListComponent implements OnInit {
// Split news on two columns on desktop mode or one column in mobile mode.
private setNews(news: PostWithMeta): void {
if (this.bigNews) {
news.posts = news.posts.filter((elem) => {
return elem.id != this.bigNews.id;
});
}
this.pagination = news.meta.pagination;
const customIndex = this.postsMobileView.length; // For scroll loading, start with previous index.
news.posts.forEach((val, index) => {
......
......@@ -26,9 +26,7 @@ export class PostService {
public getPosts(page: number, tags?: string[]): Observable<PostWithMeta> {
if (!tags) {
return this.http
.get<PostWithMeta>(
`${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.aLaUne},${TagEnum.appels}]`
)
.get<PostWithMeta>(`${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.appels}]`)
.pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
}
let tagsString = '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment