fix: protect invitations route

This commit is contained in:
Phan An 2023-08-24 00:10:36 +02:00
parent 39931bf2ae
commit f2aff43038
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC

View file

@ -52,12 +52,9 @@ Route::prefix('api')->middleware('api')->group(static function (): void {
Route::get('ping', static fn () => null);
Route::get('invitations', [UserInvitationController::class, 'get']);
Route::post('invitations', [UserInvitationController::class, 'invite']);
Route::post('invitations/accept', [UserInvitationController::class, 'accept']);
Route::middleware('auth')->group(static function (): void {
Route::delete('invitations', [UserInvitationController::class, 'revoke']);
Route::post('broadcasting/auth', static function (Request $request) {
$pusher = new Pusher(
config('broadcasting.connections.pusher.key'),
@ -149,6 +146,9 @@ Route::prefix('api')->middleware('api')->group(static function (): void {
Route::get('search', ExcerptSearchController::class);
Route::get('search/songs', SongSearchController::class);
Route::post('invitations', [UserInvitationController::class, 'invite']);
Route::delete('invitations', [UserInvitationController::class, 'revoke']);
});
// Object-storage (S3) routes