Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BangBeli_Test
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yoas Sahat Marulitua Hutapea
BangBeli_Test
Commits
c1400a6f
Commit
c1400a6f
authored
Jul 19, 2023
by
Yoas-Hutapea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Controller
parent
2871f5cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
AuthController.php
BangBeli_Test/app/Http/Controllers/API/AuthController.php
+4
-4
No files found.
BangBeli_Test/app/Http/Controllers/API/AuthController.php
View file @
c1400a6f
...
...
@@ -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 Log
out.'
,
]);
}
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment