Fixes for deleting tokens from /logout route
This commit is contained in:
parent
2eae22221f
commit
e6e8b21c5e
1 changed files with 4 additions and 2 deletions
|
|
@ -59,9 +59,11 @@ class LogoutController extends BaseController
|
|||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
CompanyToken::with('company')
|
||||
$ct = CompanyToken::with('company.tokens')
|
||||
->whereRaw('BINARY `token`= ?', [$request->header('X-API-TOKEN')])
|
||||
->company
|
||||
->first();
|
||||
|
||||
$ct->company
|
||||
->tokens()
|
||||
->where('is_system', true)
|
||||
->forceDelete();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue