Add Webhook Endpoints for external automation

- Create WebhookController with 4 endpoints:
  - POST /api/webhooks/posts - Create a new post
  - GET /api/webhooks/posts - List posts with filters
  - POST /api/webhooks/posts/{post}/publish - Trigger publishing
  - GET /api/webhooks/posts/{post}/status - Get post status
- Add X-Muninn-Token header authentication
- Add MUNINN_WEBHOOK_TOKEN config in services.php
- Add MUNINN_WEBHOOK_TOKEN to .env.example
- Add webhook routes with /webhooks prefix

All endpoints return JSON responses with success/error fields.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
m105
2026-07-27 21:50:17 +03:00
parent f3c7f1d9ca
commit cee9fdc290
4 changed files with 272 additions and 0 deletions
+4
View File
@@ -35,4 +35,8 @@ return [
],
],
'muninn' => [
'webhook_token' => env('MUNINN_WEBHOOK_TOKEN', null),
],
];