inhaus-plugin-chat/routes/api.php
Friederich Loheide 2844452002 Nachrichten-Plugin 1.0.0: Direktnachrichten, Gruppen, Anhänge, GIFs, Emojis
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 16:34:53 +00:00

15 lines
860 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
use Illuminate\Support\Facades\Route;
use Inhaus\Plugins\Chat\Http\Controllers\ConversationController;
use Inhaus\Plugins\Chat\Http\Controllers\MessageController;
// /api/v1/chat … für die Inhaus-App (Token nötig) – dieselben Regeln wie im Portal
Route::prefix('chat')->group(function () {
Route::get('/conversations', [ConversationController::class, 'index']);
Route::post('/direct', [ConversationController::class, 'direct'])->middleware('throttle:30,1');
Route::get('/conversations/{conversation}/messages', [MessageController::class, 'index']);
Route::post('/conversations/{conversation}/messages', [MessageController::class, 'store'])->middleware('throttle:60,1');
Route::post('/conversations/{conversation}/read', [MessageController::class, 'read']);
Route::get('/unread', [MessageController::class, 'unread']);
});