We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 72-89 (lines=18) @@ | ||
| 69 | // API Authentication routes |
|
| 70 | // Create new Token |
|
| 71 | $this->router->group( |
|
| 72 | ['prefix' => 'v1', 'namespace' => '\GiveBlood\Units\Authentication\Http\Controllers\Auth'], function ($auth) { |
|
| 73 | $auth->post('/auth/login', 'AuthenticateController@authenticate'); |
|
| 74 | $auth->get('/auth/logout', 'AuthenticateController@logout'); |
|
| 75 | $auth->post('/auth/register', 'AuthenticateController@register'); |
|
| 76 | $auth->group( |
|
| 77 | ['prefix' => 'password'], function ($password) { |
|
| 78 | $password->post('/recover', 'PasswordResetController@recover')->name('password.reset'); |
|
| 79 | $password->post('/reset/{token}', 'PasswordResetController@reset'); |
|
| 80 | } |
|
| 81 | ); |
|
| 82 | // invitation routes |
|
| 83 | $auth->group( |
|
| 84 | ['prefix' => 'invitation'], function ($invitation) { |
|
| 85 | $invitation->post('/', 'InvitationRequestsController@createInvitation'); |
|
| 86 | $invitation->get('/check', 'InvitationRequestsController@checkInvation'); |
|
| 87 | } |
|
| 88 | ); |
|
| 89 | } |
|
| 90 | ); |
|
| 91 | ||
| 92 | $this->router->group( |
|
| @@ 93-110 (lines=18) @@ | ||
| 90 | ); |
|
| 91 | ||
| 92 | $this->router->group( |
|
| 93 | ['prefix' => 'v1', 'namespace' => '\GiveBlood\Units\Authentication\Http\Controllers\Auth'], function ($auth) { |
|
| 94 | $auth->post('/auth/login', 'AuthenticateController@authenticate'); |
|
| 95 | $auth->get('/auth/logout', 'AuthenticateController@logout'); |
|
| 96 | // $auth->post('/auth/register', 'AuthenticateController@register'); |
|
| 97 | $auth->group( |
|
| 98 | ['prefix' => 'password'], function ($password) { |
|
| 99 | $password->post('/recover', 'PasswordResetController@recover')->name('password.reset'); |
|
| 100 | $password->post('/reset/{token}', 'PasswordResetController@reset'); |
|
| 101 | } |
|
| 102 | ); |
|
| 103 | // invitation routes |
|
| 104 | $auth->group( |
|
| 105 | ['prefix' => 'invitation'], function ($invitation) { |
|
| 106 | $invitation->post('/', 'InvitationRequestsController@createInvitation'); |
|
| 107 | $invitation->get('/check', 'InvitationRequestsController@checkInvation'); |
|
| 108 | } |
|
| 109 | ); |
|
| 110 | } |
|
| 111 | ); |
|
| 112 | } |
|
| 113 | ||
| @@ 137-160 (lines=24) @@ | ||
| 134 | ||
| 135 | // Routes related to logged in user |
|
| 136 | $this->router->group( |
|
| 137 | ['prefix' => 'me', 'namespace' => 'User'], function ($user) { |
|
| 138 | // Get user information. |
|
| 139 | $user->get('/', 'AccountController@userInfo'); |
|
| 140 | // Update User profile information. |
|
| 141 | $user->put('/', 'AccountController@updateProfile'); |
|
| 142 | // User campigns |
|
| 143 | $user->group( |
|
| 144 | ['prefix' => 'campaigns'], function ($campaign) { |
|
| 145 | // Get all user Campaigns. |
|
| 146 | $campaign->get('/', 'CampaignController@index'); |
|
| 147 | // Create Campaign |
|
| 148 | $campaign->post('/', 'CampaignController@store'); |
|
| 149 | // Show complete info about campaign |
|
| 150 | $campaign->get('/{campaign}', 'CampaignController@show'); |
|
| 151 | // Update campaign |
|
| 152 | $campaign->put('/{campaign}', 'CampaignController@update'); |
|
| 153 | // Detele Campaign |
|
| 154 | $campaign->delete('/{campaign}', 'CampaignController@destroy'); |
|
| 155 | } |
|
| 156 | ); |
|
| 157 | ||
| 158 | // User donations |
|
| 159 | $user->get('/donations', 'DonationController@donations'); |
|
| 160 | } |
|
| 161 | ); |
|
| 162 | ||
| 163 | // Blood Banks |
|