feat: complete scheduled publishing, security remediation and DEV_TICKETS implementation
This commit is contained in:
1 parent
d6d4158cbe
commit
efb3c473c4
35 files changed
+685
-185
No files matched your search
@@ -182,6 +182,17 @@ export class BlogsService {
|
||||
throw new NotFoundException('مقاله یافت نشد');
|
||||
}
|
||||
|
||||
// Public route must not expose scheduled, draft, or future published posts
|
||||
const now = new Date();
|
||||
const isReady =
|
||||
blog.isPublished &&
|
||||
blog.status === 'PUBLISHED' &&
|
||||
(!blog.publishedAt || blog.publishedAt <= now);
|
||||
|
||||
if (!isReady) {
|
||||
throw new NotFoundException('مقاله یافت نشد');
|
||||
}
|
||||
|
||||
// Fetch related products safely
|
||||
let relatedProducts: any[] = [];
|
||||
if (
|
||||
|
||||
Reference in new issue
Block a user