main
nocode 1 year ago
parent fe6a0fd290
commit f5b15c6e69
  1. 2
      app/Http/Controllers/Api/AuthApiController.php

@ -30,7 +30,7 @@ class AuthApiController extends BaseAuthApiController
$user = User::where('phone', $request->username)->first(); $user = User::where('phone', $request->username)->first();
} }
if(empty($user)){ if(empty($user)){
return response()->json(['status' =>false, 'msg' => 'Email hoặc SDT chưa được đăng ký.'], parent::HTTP_OK); return response()->json(['status' =>false, 'msg' => 'Email hoặc SĐT chưa được đăng ký.'], parent::HTTP_OK);
} }
if (!Auth::attempt(['id' => $user->id, 'password' => $request->password])) { if (!Auth::attempt(['id' => $user->id, 'password' => $request->password])) {
return response()->json(['status' =>false, 'msg' =>'Tài khoản hoặc mật khẩu không chính xác. Vui lòng thử lại.'], parent::HTTP_OK); return response()->json(['status' =>false, 'msg' =>'Tài khoản hoặc mật khẩu không chính xác. Vui lòng thử lại.'], parent::HTTP_OK);

Loading…
Cancel
Save