hero section added
hero article menagment implemented in admin UI
This commit is contained in:
1 parent
6d65d5975c
commit
add12b2fbf
10 files changed
+604
-217
No files matched your search
@@ -293,4 +293,15 @@ export class ArticlesService {
|
||||
await this.articleRepository.remove(article);
|
||||
this.logger.log(`Successfully deleted article with strapiId: ${strapiId}`);
|
||||
}
|
||||
|
||||
async findHeroArticle(): Promise<Article | null> {
|
||||
return this.articleRepository.findOne({
|
||||
where: {
|
||||
isHero: true,
|
||||
status: ArticleStatus.PUBLISHED,
|
||||
},
|
||||
relations: ['author', 'category'],
|
||||
order: { createdAt: 'DESC' },
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user