From 61d26e85cd969ee4894c446bb6626ccbe6449bf0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault <877217+dansup@users.noreply.github.com> Date: Sun, 11 Sep 2022 02:48:47 -0600 Subject: [PATCH] Update ApiV1Controller update_credentials endpoint to support app (_pe) response --- app/Http/Controllers/Api/ApiV1Controller.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 54d31044c..e4d6fdee0 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -432,9 +432,13 @@ class ApiV1Controller extends Controller MediaSyncLicensePipeline::dispatch($user->id, $request->input('license')); } - $res = AccountService::getMastodon($user->profile_id); - $res['bio'] = strip_tags($res['note']); - $res = array_merge($res, $other); + if($request->has(self::PF_API_ENTITY_KEY)) { + $res = AccountService::get($user->profile_id, true); + } else { + $res = AccountService::getMastodon($user->profile_id, true); + $res['bio'] = strip_tags($res['note']); + $res = array_merge($res, $other); + } return $this->json($res); }