Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
laravel-adminpanel
Commits
0cba1168
Commit
0cba1168
authored
Mar 14, 2018
by
Viral Solani
Committed by
StyleCI Bot
Mar 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply fixes from StyleCI
parent
23b20325
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
Handler.php
app/Exceptions/Handler.php
+3
-3
UsersController.php
app/Http/Controllers/Api/V1/UsersController.php
+1
-2
UserRepository.php
app/Repositories/Backend/Access/User/UserRepository.php
+3
-4
No files found.
app/Exceptions/Handler.php
View file @
0cba1168
...
@@ -80,8 +80,8 @@ class Handler extends ExceptionHandler
...
@@ -80,8 +80,8 @@ class Handler extends ExceptionHandler
* Redirect if token mismatch error
* Redirect if token mismatch error
* Usually because user stayed on the same screen too long and their session expired
* Usually because user stayed on the same screen too long and their session expired
*/
*/
if
(
$exception
instanceof
\Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
)
{
if
(
$exception
instanceof
\Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
)
{
switch
(
get_class
(
$exception
->
getPrevious
()))
{
switch
(
get_class
(
$exception
->
getPrevious
()))
{
case
\App\Exceptions\Handler
::
class
:
case
\App\Exceptions\Handler
::
class
:
return
$this
->
setStatusCode
(
$exception
->
getStatusCode
())
->
respondWithError
(
'Token has not been provided.'
);
return
$this
->
setStatusCode
(
$exception
->
getStatusCode
())
->
respondWithError
(
'Token has not been provided.'
);
case
\Tymon\JWTAuth\Exceptions\TokenExpiredException
::
class
:
case
\Tymon\JWTAuth\Exceptions\TokenExpiredException
::
class
:
...
@@ -90,7 +90,7 @@ class Handler extends ExceptionHandler
...
@@ -90,7 +90,7 @@ class Handler extends ExceptionHandler
case
\Tymon\JWTAuth\Exceptions\TokenBlacklistedException
::
class
:
case
\Tymon\JWTAuth\Exceptions\TokenBlacklistedException
::
class
:
return
$this
->
setStatusCode
(
$exception
->
getStatusCode
())
->
respondWithError
(
'Token is invalid.'
);
return
$this
->
setStatusCode
(
$exception
->
getStatusCode
())
->
respondWithError
(
'Token is invalid.'
);
}
}
}
}
/*
/*
* Redirect if token mismatch error
* Redirect if token mismatch error
...
...
app/Http/Controllers/Api/V1/UsersController.php
View file @
0cba1168
...
@@ -125,8 +125,7 @@ class UsersController extends APIController
...
@@ -125,8 +125,7 @@ class UsersController extends APIController
$result
=
$this
->
repository
->
deleteAll
(
$ids
);
$result
=
$this
->
repository
->
deleteAll
(
$ids
);
}
}
if
(
$result
)
if
(
$result
)
{
{
return
$this
->
respond
([
return
$this
->
respond
([
'message'
=>
trans
(
'alerts.backend.users.deleted'
),
'message'
=>
trans
(
'alerts.backend.users.deleted'
),
]);
]);
...
...
app/Repositories/Backend/Access/User/UserRepository.php
View file @
0cba1168
...
@@ -189,7 +189,7 @@ class UserRepository extends BaseRepository
...
@@ -189,7 +189,7 @@ class UserRepository extends BaseRepository
}
}
/**
/**
* Delete User
* Delete User
.
*
*
* @param Model $user
* @param Model $user
*
*
...
@@ -213,7 +213,7 @@ class UserRepository extends BaseRepository
...
@@ -213,7 +213,7 @@ class UserRepository extends BaseRepository
}
}
/**
/**
* Delete All Users
* Delete All Users
.
*
*
* @param Model $user
* @param Model $user
*
*
...
@@ -233,8 +233,7 @@ class UserRepository extends BaseRepository
...
@@ -233,8 +233,7 @@ class UserRepository extends BaseRepository
$result
=
DB
::
table
(
'users'
)
->
whereIn
(
'id'
,
$ids
)
->
delete
();
$result
=
DB
::
table
(
'users'
)
->
whereIn
(
'id'
,
$ids
)
->
delete
();
if
(
$result
)
if
(
$result
)
{
{
return
true
;
return
true
;
}
}
...
...
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