Beautiful Open-Source Form Builder
Merge branch 'main' of https://github.com/JhumanJ/OpnForm
JhumanJ0bded107d689
diff --cc app/Http/Resources/FormResource.phpindex f8ebfff40,4aca39c11..71dee8cc5--- a/app/Http/Resources/FormResource.php+++ b/app/Http/Resources/FormResource.php@@@ -24,12 -24,11 +24,12 @@@ class FormResource extends JsonResourcreturn $this->getPasswordProtectedForm();}- $ownerData = $userIsFormOwner ? [- 'creator' => $this->creator,- 'views_count' => $this->when($this->workspace->is_pro, $this->views_count),- 'submissions_count' => $this->when($this->workspace->is_pro, $this->submissions_count),+ $ownerData = $this->userIsFormOwner() ? [+ 'creator' => new UserResource($this->creator),+ 'views_count' => $this->when($this->workspaceIsPro(), $this->views_count),+ 'submissions_count' => $this->when($this->workspaceIsPro(), $this->submissions_count),'notifies' => $this->notifies,+ 'notifies_slack' => $this->notifies_slack,'send_submission_confirmation' => $this->send_submission_confirmation,'webhook_url' => $this->webhook_url,'redirect_url' => $this->redirect_url,@@@ -43,14 -42,14 +43,15 @@@'password' => $this->password,'tags' => $this->tags,'notification_emails' => $this->notification_emails,+ 'slack_webhook_url' => $this->slack_webhook_url,] : [];- $baseData = $this->getFilteredFormData(parent::toArray($request), $userIsFormOwner);+ $baseData = $this->getFilteredFormData(parent::toArray($request), $this->userIsFormOwner());return array_merge($baseData, $ownerData, [+ 'is_pro' => $this->workspaceIsPro(),'workspace_id' => $this->workspace_id,- 'workspace' => new WorkspaceResource($this->workspace),+ 'workspace' => new WorkspaceResource($this->getWorkspace()),'is_closed' => $this->is_closed,'is_password_protected' => false,'has_password' => $this->has_password,