Commit c1400a6f by Yoas-Hutapea

Update Controller

parent 2871f5cc
......@@ -59,14 +59,14 @@ class AuthController extends Controller
if (!$user) {
return response()->json([
'error' => 'invalid_credentials',
'message' => 'Invalid username or user not found.',
'message' => 'Username Salah atau User Belum Terdaftar.',
], 401);
}
if (!Hash::check($request->password, $user->password)) {
return response()->json([
'error' => 'invalid_credentials',
'message' => 'Invalid password.',
'message' => 'Password Salah.',
], 401);
}
......@@ -85,7 +85,7 @@ class AuthController extends Controller
JWTAuth::setToken($token)->invalidate();
return response()->json([
'message' => 'Successfully logged out.',
'message' => 'Berhasil Logout.',
]);
}
......@@ -105,7 +105,7 @@ class AuthController extends Controller
if (!$user) {
return response()->json([
'error' => 'not_found',
'message' => 'User not found.',
'message' => 'User tidak ditemukan.',
], 404);
}
......
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 to comment