Skip to content

Commit

Permalink
restifyjs setup without auth middleware (#598)
Browse files Browse the repository at this point in the history
* fix: restifyjs setup without auth middleware

* Fix styling

---------

Co-authored-by: binaryk <binaryk@users.noreply.github.com>
  • Loading branch information
binaryk and binaryk committed Dec 30, 2023
1 parent 7961f44 commit 1d41e72
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Bootstrap/RoutesDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Binaryk\LaravelRestify\Http\Controllers\ProfileController;
use Binaryk\LaravelRestify\Http\Controllers\ProfileUpdateController;
use Binaryk\LaravelRestify\Http\Controllers\RestifyJsSetupController;
use Binaryk\LaravelRestify\Http\Middleware\RestifySanctumAuthenticate;
use Illuminate\Support\Facades\Route;

class RoutesDefinition
Expand Down Expand Up @@ -169,9 +168,8 @@ public function once(): void
Route::post('/profile', ProfileUpdateController::class)->name('profile.updatePost');

// RestifyJS
Route::get('/restifyjs/setup', RestifyJsSetupController::class)->withoutMiddleware(
RestifySanctumAuthenticate::class,
)->name('restifyjs.setup');
Route::get('/restifyjs/setup',
RestifyJsSetupController::class)->withoutMiddleware('auth:sanctum')->name('restifyjs.setup');
}

public function withoutMiddleware(...$middleware): self
Expand Down

0 comments on commit 1d41e72

Please sign in to comment.