mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for deleting tokens from /logout route
This commit is contained in:
parent
2eae22221f
commit
e6e8b21c5e
@ -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…
x
Reference in New Issue
Block a user