From 53bc15900ba293beac08af2268e606358ffd1f75 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 28 Jun 2022 23:23:55 -0700 Subject: [PATCH] Formatted show api Signed-off-by: snipe --- app/Http/Controllers/Api/ProfileController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/ProfileController.php b/app/Http/Controllers/Api/ProfileController.php index ec9b3de3ee..691efda981 100644 --- a/app/Http/Controllers/Api/ProfileController.php +++ b/app/Http/Controllers/Api/ProfileController.php @@ -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)); + }