Formatted show api

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-06-28 23:23:55 -07:00
parent 90fe7af863
commit 53bc15900b

View file

@ -145,11 +145,12 @@ class ProfileController extends Controller
}
$tokens = $this->tokenRepository->forUser(Auth::user()->getAuthIdentifier());
return $tokens->load('client')->filter(function ($token) {
$token_values = $tokens->load('client')->filter(function ($token) {
return $token->client->personal_access_client && ! $token->revoked;
})->values();
return response()->json(Helper::formatStandardApiResponse('success', $token_values, null));
}