We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 92-98 (lines=7) @@ | ||
89 | ); |
|
90 | } |
|
91 | ||
92 | if (auth()->user()->id != $campaign->user_id) { |
|
93 | return response()->json( |
|
94 | [ |
|
95 | 'message' => 'You haven\'t permission to update this entry' |
|
96 | ] |
|
97 | ); |
|
98 | } |
|
99 | ||
100 | // If validation pass: update the entry. |
|
101 | $campaign->save(); |
|
@@ 133-139 (lines=7) @@ | ||
130 | ); |
|
131 | } |
|
132 | ||
133 | if (auth()->user()->id != $campaign->user_id) { |
|
134 | return response()->json( |
|
135 | [ |
|
136 | 'message' => 'You haven\'t permission to delete this entry' |
|
137 | ] |
|
138 | ); |
|
139 | } |
|
140 | ||
141 | $campaign->delete(); |
|
142 |