mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 07:14:36 -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)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
CompanyToken::with('company')
|
$ct = CompanyToken::with('company.tokens')
|
||||||
->whereRaw('BINARY `token`= ?', [$request->header('X-API-TOKEN')])
|
->whereRaw('BINARY `token`= ?', [$request->header('X-API-TOKEN')])
|
||||||
->company
|
->first();
|
||||||
|
|
||||||
|
$ct->company
|
||||||
->tokens()
|
->tokens()
|
||||||
->where('is_system', true)
|
->where('is_system', true)
|
||||||
->forceDelete();
|
->forceDelete();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user