Add sudo mode to routes

This commit is contained in:
Daniel Supernault 2018-09-09 23:12:51 -06:00
parent 652f305953
commit 3b7b90b394
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -68,6 +68,9 @@ Route::domain(config('pixelfed.domain.app'))->middleware('validemail')->group(fu
Route::post('verify-email', 'AccountController@sendVerifyEmail')->middleware('throttle:10,1440'); Route::post('verify-email', 'AccountController@sendVerifyEmail')->middleware('throttle:10,1440');
Route::get('confirm-email/{userToken}/{randomToken}', 'AccountController@confirmVerifyEmail')->middleware('throttle:10,1440'); Route::get('confirm-email/{userToken}/{randomToken}', 'AccountController@confirmVerifyEmail')->middleware('throttle:10,1440');
Route::get('auth/sudo', 'AccountController@sudoMode');
Route::post('auth/sudo', 'AccountController@sudoModeVerify');
Route::group(['prefix' => 'report'], function () { Route::group(['prefix' => 'report'], function () {
Route::get('/', 'ReportController@showForm')->name('report.form'); Route::get('/', 'ReportController@showForm')->name('report.form');
Route::post('/', 'ReportController@formStore')->middleware('throttle:100,1440'); Route::post('/', 'ReportController@formStore')->middleware('throttle:100,1440');
@ -98,8 +101,8 @@ Route::domain(config('pixelfed.domain.app'))->middleware('validemail')->group(fu
Route::post('home', 'SettingsController@homeUpdate')->middleware('throttle:25,1440'); Route::post('home', 'SettingsController@homeUpdate')->middleware('throttle:25,1440');
Route::get('avatar', 'SettingsController@avatar')->name('settings.avatar'); Route::get('avatar', 'SettingsController@avatar')->name('settings.avatar');
Route::post('avatar', 'AvatarController@store')->middleware('throttle:5,1440'); Route::post('avatar', 'AvatarController@store')->middleware('throttle:5,1440');
Route::get('password', 'SettingsController@password')->name('settings.password'); Route::get('password', 'SettingsController@password')->name('settings.password')->middleware('dangerzone');
Route::post('password', 'SettingsController@passwordUpdate')->middleware('throttle:2,1440'); Route::post('password', 'SettingsController@passwordUpdate')->middleware(['throttle:2,1440','dangerzone']);
Route::get('email', 'SettingsController@email')->name('settings.email'); Route::get('email', 'SettingsController@email')->name('settings.email');
Route::get('notifications', 'SettingsController@notifications')->name('settings.notifications'); Route::get('notifications', 'SettingsController@notifications')->name('settings.notifications');
Route::get('privacy', 'SettingsController@privacy')->name('settings.privacy'); Route::get('privacy', 'SettingsController@privacy')->name('settings.privacy');