Commit 1d880627 by 杨树贤

邮箱验证码提前返回到响应

parent e567922c
......@@ -2,13 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="fb90add0-1393-48c2-9f26-72365d42cd03" name="变更" comment="">
<change beforePath="$PROJECT_DIR$/.env" beforeDir="false" afterPath="$PROJECT_DIR$/.env" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/BrandController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/BrandController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Services/BrandService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Services/BrandService.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/helpers.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/helpers.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Api/AuthApiController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Api/AuthApiController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bootstrap/app.php" beforeDir="false" afterPath="$PROJECT_DIR$/bootstrap/app.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bootstrap/cache/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/bootstrap/cache/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/routes/api.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/api.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/storage/app/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/storage/app/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/storage/app/public/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/storage/app/public/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/storage/framework/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/storage/framework/.gitignore" afterDir="false" />
......@@ -190,6 +188,7 @@
<workItem from="1666835076791" duration="693000" />
<workItem from="1667266026118" duration="40321000" />
<workItem from="1667959054458" duration="183000" />
<workItem from="1667986756173" duration="2006000" />
</task>
<servers />
</component>
......
......@@ -133,6 +133,7 @@ class AuthApiController extends Controller
Redis::expire($redisKey, 60);
$subject = config('mail.from.name');
$msg = 'Email Code:' . $code . '.';
return $this->setSuccessData($code);
Mail::raw($msg, function ($message) use ($email, $subject) {
$message->to($email)->subject($subject);
});
......
......@@ -17,6 +17,7 @@ use Illuminate\Support\Facades\Route;
Route::middleware(['api'])->namespace('Api')->group(function () {
Route::POST('/auth/login', 'AuthApiController@login');
Route::POST('/auth/register', 'AuthApiController@register');
Route::POST('auth/send_email_code', 'AuthApiController@sendEmailCode');
});
......@@ -24,7 +25,6 @@ Route::middleware(['api', 'api.check'])->namespace('Api')->group(function () {
Route::GET('/auth/logout', 'AuthApiController@logout');
Route::POST('auth/reset_password', 'AuthApiController@resetPassword');
Route::POST('auth/send_email_code', 'AuthApiController@sendEmailCode');
Route::get('user/info', 'UserApiController@info');
Route::POST('user/update', 'UserApiController@update');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment