@@ -42,7 +42,7 @@ |
||
42 | 42 | { |
43 | 43 | if (strcmp($request->password, $request->confirm_password) == 0) { |
44 | 44 | $params = $request->validated(); |
45 | - unset($params['confirm_password']); |
|
45 | + unset($params[ 'confirm_password' ]); |
|
46 | 46 | $ministry = new Ministry($params); |
47 | 47 | try { |
48 | 48 | $ministry->save(); |
@@ -50,8 +50,9 @@ discard block |
||
50 | 50 | } catch (\Exception $e) { |
51 | 51 | abort(500, $e->getMessage()); |
52 | 52 | } |
53 | - } else |
|
54 | - abort(500, 'Passwords did not match'); |
|
53 | + } else { |
|
54 | + abort(500, 'Passwords did not match'); |
|
55 | + } |
|
55 | 56 | } |
56 | 57 | |
57 | 58 | function login(LoginRequest $request) |
@@ -71,8 +72,9 @@ discard block |
||
71 | 72 | } catch (\Exception $e) { |
72 | 73 | abort(500, $e->getMessage()); |
73 | 74 | } |
74 | - } else |
|
75 | - abort(500, 'Activation code is incorrect!'); |
|
75 | + } else { |
|
76 | + abort(500, 'Activation code is incorrect!'); |
|
77 | + } |
|
76 | 78 | return $ministry; |
77 | 79 | } |
78 | 80 | |
@@ -82,8 +84,9 @@ discard block |
||
82 | 84 | if ($ministry) { |
83 | 85 | $ministry->notify(new ForgotPassword($ministry)); |
84 | 86 | return $this->successResponse('We have emailed you a reset password email, please follow it to to update your password'); |
85 | - } else |
|
86 | - abort(500, 'Account with email not found!'); |
|
87 | + } else { |
|
88 | + abort(500, 'Account with email not found!'); |
|
89 | + } |
|
87 | 90 | } |
88 | 91 | |
89 | 92 | function resendActivation() |
@@ -6,26 +6,26 @@ |
||
6 | 6 | use FaithGen\SDK\Http\Controllers\ImageController; |
7 | 7 | use FaithGen\SDK\Http\Controllers\MinistryController; |
8 | 8 | |
9 | -Route::name('ministry.')->prefix('ministry/')->group(function () { |
|
10 | - Route::post('social-link', [MinistryController::class, 'getSocialLink']); |
|
11 | - Route::get('profile', [MinistryController::class, 'getProfile']); |
|
12 | - Route::get('account-type', [MinistryController::class, 'accountType']); |
|
9 | +Route::name('ministry.')->prefix('ministry/')->group(function() { |
|
10 | + Route::post('social-link', [ MinistryController::class, 'getSocialLink' ]); |
|
11 | + Route::get('profile', [ MinistryController::class, 'getProfile' ]); |
|
12 | + Route::get('account-type', [ MinistryController::class, 'accountType' ]); |
|
13 | 13 | }); |
14 | 14 | |
15 | -Route::name('images.')->prefix('images')->group(function () { |
|
16 | - Route::post('comment', [ImageController::class, 'comment']); |
|
17 | - Route::get('comments/{image}', [ImageController::class, 'comments']); |
|
15 | +Route::name('images.')->prefix('images')->group(function() { |
|
16 | + Route::post('comment', [ ImageController::class, 'comment' ]); |
|
17 | + Route::get('comments/{image}', [ ImageController::class, 'comments' ]); |
|
18 | 18 | }); |
19 | 19 | |
20 | 20 | Route::prefix('reviews') |
21 | - ->group(function () { |
|
22 | - Route::post('', [ReviewController::class, 'sendReview']); |
|
21 | + ->group(function() { |
|
22 | + Route::post('', [ ReviewController::class, 'sendReview' ]); |
|
23 | 23 | }); |
24 | 24 | |
25 | 25 | if (!config('faithgen-sdk.source')) { |
26 | 26 | Route::prefix('comments') |
27 | - ->group(function () { |
|
28 | - Route::post('presence', [CommentController::class, 'presenceRegister']); |
|
29 | - Route::post('typing', [CommentController::class, 'showTyping']); |
|
27 | + ->group(function() { |
|
28 | + Route::post('presence', [ CommentController::class, 'presenceRegister' ]); |
|
29 | + Route::post('typing', [ CommentController::class, 'showTyping' ]); |
|
30 | 30 | }); |
31 | 31 | } |
@@ -4,10 +4,10 @@ |
||
4 | 4 | use Illuminate\Support\Facades\Route; |
5 | 5 | |
6 | 6 | Route::prefix('users') |
7 | - ->group(function () { |
|
8 | - Route::post('register', [UsersController::class, 'register'])->name('users.register'); |
|
9 | - Route::post('update', [UsersController::class, 'update']); |
|
10 | - Route::post('login', [UsersController::class, 'login']); |
|
11 | - Route::delete('', [UsersController::class, 'deleteUserAccount']); |
|
12 | - Route::get('user', [UsersController::class, 'getUser']); |
|
7 | + ->group(function() { |
|
8 | + Route::post('register', [ UsersController::class, 'register' ])->name('users.register'); |
|
9 | + Route::post('update', [ UsersController::class, 'update' ]); |
|
10 | + Route::post('login', [ UsersController::class, 'login' ]); |
|
11 | + Route::delete('', [ UsersController::class, 'deleteUserAccount' ]); |
|
12 | + Route::get('user', [ UsersController::class, 'getUser' ]); |
|
13 | 13 | }); |
@@ -3,6 +3,6 @@ |
||
3 | 3 | use FaithGen\SDK\Http\Controllers\AuthController; |
4 | 4 | use Illuminate\Support\Facades\Route; |
5 | 5 | |
6 | -Route::prefix('auth/')->namespace('FaithGen\SDK\Http\Controllers')->group(function () { |
|
7 | - Route::get('activate/{ministry}/{code}', [AuthController::class, 'activateAccount'])->name('activateAccount')->middleware('bindings'); |
|
6 | +Route::prefix('auth/')->namespace('FaithGen\SDK\Http\Controllers')->group(function() { |
|
7 | + Route::get('activate/{ministry}/{code}', [ AuthController::class, 'activateAccount' ])->name('activateAccount')->middleware('bindings'); |
|
8 | 8 | }); |
@@ -3,12 +3,12 @@ |
||
3 | 3 | use FaithGen\SDK\Http\Controllers\MinistryController; |
4 | 4 | use Illuminate\Support\Facades\Route; |
5 | 5 | |
6 | -Route::name('ministry.')->prefix('ministry/')->group(function () { |
|
7 | - Route::get('users', [MinistryController::class, 'users']); |
|
8 | - Route::put('social-link', [MinistryController::class, 'saveSocialLink']); |
|
9 | - Route::post('profile', [MinistryController::class, 'updateProfile']); |
|
10 | - Route::post('photo', [MinistryController::class, 'updatePhoto']); |
|
11 | - Route::post('password', [MinistryController::class, 'updatePassword']); |
|
12 | - Route::post('users/toggle-activity', [MinistryController::class, 'toggleActivity']); |
|
13 | - Route::delete('/', [MinistryController::class, 'deleteProfile']); |
|
6 | +Route::name('ministry.')->prefix('ministry/')->group(function() { |
|
7 | + Route::get('users', [ MinistryController::class, 'users' ]); |
|
8 | + Route::put('social-link', [ MinistryController::class, 'saveSocialLink' ]); |
|
9 | + Route::post('profile', [ MinistryController::class, 'updateProfile' ]); |
|
10 | + Route::post('photo', [ MinistryController::class, 'updatePhoto' ]); |
|
11 | + Route::post('password', [ MinistryController::class, 'updatePassword' ]); |
|
12 | + Route::post('users/toggle-activity', [ MinistryController::class, 'toggleActivity' ]); |
|
13 | + Route::delete('/', [ MinistryController::class, 'deleteProfile' ]); |
|
14 | 14 | }); |
@@ -3,11 +3,11 @@ |
||
3 | 3 | use FaithGen\SDK\Http\Controllers\AuthController; |
4 | 4 | use Illuminate\Support\Facades\Route; |
5 | 5 | |
6 | -Route::prefix('auth/')->name('auth.')->group(function () { |
|
7 | - Route::post('register', [AuthController::class, 'register'])->name('register'); |
|
8 | - Route::post('login', [AuthController::class, 'login'])->name('login'); |
|
9 | - Route::post('forgot-password', [AuthController::class, 'forgotPassword'])->name('forgotPassword'); |
|
10 | - Route::get('resend-activation', [AuthController::class, 'resendActivation'])->name('resendActivation')->middleware('auth:api'); |
|
11 | - Route::delete('delete-account', [AuthController::class, 'deleteAccount'])->name('deleteAccount')->middleware('auth:api'); |
|
12 | - Route::get('logout', [AuthController::class, 'logout'])->name('logout')->middleware('auth:api'); |
|
6 | +Route::prefix('auth/')->name('auth.')->group(function() { |
|
7 | + Route::post('register', [ AuthController::class, 'register' ])->name('register'); |
|
8 | + Route::post('login', [ AuthController::class, 'login' ])->name('login'); |
|
9 | + Route::post('forgot-password', [ AuthController::class, 'forgotPassword' ])->name('forgotPassword'); |
|
10 | + Route::get('resend-activation', [ AuthController::class, 'resendActivation' ])->name('resendActivation')->middleware('auth:api'); |
|
11 | + Route::delete('delete-account', [ AuthController::class, 'deleteAccount' ])->name('deleteAccount')->middleware('auth:api'); |
|
12 | + Route::get('logout', [ AuthController::class, 'logout' ])->name('logout')->middleware('auth:api'); |
|
13 | 13 | }); |