1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fixes for correct token

This commit is contained in:
David Bomba 2023-03-13 21:31:15 +11:00
parent 60a3fd7863
commit 7932339040

View File

@ -80,7 +80,11 @@ class CompanyUserTransformer extends EntityTransformer
public function includeToken(CompanyUser $company_user)
{
$token = $company_user->tokens()->where('company_id', $company_user->company_id)->where('user_id', $company_user->user_id)->first();
$token = $company_user->tokens()
->where('company_id', $company_user->company_id)
->where('user_id', $company_user->user_id)
->where('is_system', 1)
->first();
$transformer = new CompanyTokenTransformer($this->serializer);