Create common function for userIsFormOwner & rewrite protected form (#244)

* Create common function for userIsFormOwner & rewrite protected form

* fix testcase
This commit is contained in:
formsdev
2023-11-28 15:53:04 +05:30
committed by GitHub
parent 64e79f34f2
commit d65c1be9b5
6 changed files with 39 additions and 34 deletions

View File

@@ -139,7 +139,7 @@ Route::group(['prefix' => 'appsumo'], function () {
* Public Forms related routes
*/
Route::prefix('forms')->name('forms.')->group(function () {
Route::middleware('password-protected-form')->group(function () {
Route::middleware('protected-form')->group(function () {
Route::post('{slug}/answer', [PublicFormController::class, 'answer'])->name('answer');
// Form content endpoints (user lists, relation lists etc.)