hero section added

hero article menagment implemented in admin UI
This commit is contained in:
dimitar committed 2026-02-06 02:14:10 +01:00
1 parent 6d65d5975c
commit add12b2fbf
10 files changed
+604 -217

No files matched your search

+11
View File
@@ -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' },
});
}
}