feat(blog): add admin endpoint for blog details and cache invalidation

- Implemented `adminDetail()` method in `BlogController` to retrieve blog posts of any status for admin editing.
- Introduced `BlogCacheInvalidator` service to handle cache invalidation after blog create/update/delete actions.
- Updated existing methods in `BlogController` and `RepresentationBlogController` to call cache invalidation on blog modifications.
- Enhanced `BlogFormPage` and `RepresentationBlogFormPage` to utilize the new admin endpoint for fetching blog data.
- Added tests for `BlogCacheInvalidator` to ensure proper functionality and error handling.
- Updated documentation to reflect new API endpoint and cache invalidation behavior.
This commit is contained in:
hamed
2026-07-27 18:54:35 +03:30
parent e4edaea9b8
commit 15abcb5c8a
12 changed files with 972 additions and 47 deletions
+5
View File
@@ -121,6 +121,11 @@ services:
arguments:
$projectDir: '%kernel.project_dir%'
App\Blog\Service\BlogCacheInvalidator:
arguments:
$webhookUrl: '%env(REVALIDATE_WEBHOOK_URL)%'
$webhookSecret: '%env(REVALIDATE_WEBHOOK_SECRET)%'
App\Insurance\Controller\InsuranceController:
arguments:
$projectDir: '%kernel.project_dir%'