Skip to content

Commit e6df2b2

Browse files
author
Addin Gama Bertaqwa
committed
add api email verification
1 parent 3b30421 commit e6df2b2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

app/Http/Controllers/TMoney/GeneralController.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,15 @@ public function emailCheck(Request $request, $email) {
4545
return $this->responseError($request, $e);
4646
}
4747
}
48+
49+
public function emailVerification(Request $request, $activationCode) {
50+
try {
51+
$response = emailVerification($activationCode);
52+
$body = $response->getBody();
53+
$json = json_decode($body);
54+
return $this->responseSuccess($request, $json);
55+
} catch (BadResponseException $e) {
56+
return $this->responseError($request, $e);
57+
}
58+
}
4859
}

routes/api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@
2121
Route::group(['namespace' => 'TMoney'], function () {
2222
Route::get('/access_token', 'GeneralController@getAccessToken');
2323
Route::get('/email_check/{email}', 'GeneralController@emailCheck');
24+
Route::get('/email_verification/{activationCode}', 'GeneralController@emailVerification');
2425
});

0 commit comments

Comments
 (0)