Skip to content

Commit

Permalink
fix: secured requests to /calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars- committed Jul 25, 2023
1 parent e1c648a commit e7c812f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LJPcCalendarModule/Http/routes.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

Route::group( [ 'middleware' => 'web', 'prefix' => Helper::getSubdirectory(), 'namespace' => 'Modules\LJPcCalendarModule\Http\Controllers' ], function () {
Route::get( '/calendar', [ 'uses' => 'LJPcCalendarModuleController@index' ] )->name( 'ljpccalendarmodule.index' );
Route::get( '/calendar/ajax', [ 'uses' => 'LJPcCalendarModuleController@getItems' ] )->name( 'ljpccalendarmodule.ajax' );
Route::post( '/calendar/ajax', [ 'uses' => 'LJPcCalendarModuleController@ajax' ] )->name( 'ljpccalendarmodule.ajax' );
Route::get( '/calendar', [ 'uses' => 'LJPcCalendarModuleController@index', 'middleware' => [ 'auth', 'roles' ], 'roles' => [ 'user', 'admin' ] ] )->name( 'ljpccalendarmodule.index' );
Route::get( '/calendar/ajax', [ 'uses' => 'LJPcCalendarModuleController@getItems', 'middleware' => [ 'auth', 'roles' ], 'roles' => [ 'user', 'admin' ] ] )->name( 'ljpccalendarmodule.ajax' );
Route::post( '/calendar/ajax', [ 'uses' => 'LJPcCalendarModuleController@ajax', 'middleware' => [ 'auth', 'roles' ], 'roles' => [ 'user', 'admin' ] ] )->name( 'ljpccalendarmodule.ajax' );
} );

Route::group( [ 'prefix' => Helper::getSubdirectory(), 'namespace' => 'Modules\LJPcCalendarModule\Http\Controllers' ], function () {
Route::get( '/calendar/{id}', [ 'uses' => 'LJPcCalendarModuleController@export' ] )->name( 'ljpccalendarmodule.external' );
Route::get( '/calendar/{id}', [ 'uses' => 'LJPcCalendarModuleController@export' ] )->name( 'ljpccalendarmodule.external' );
} );

0 comments on commit e7c812f

Please sign in to comment.