Update ApiV1Controller update_credentials endpoint to support app (_pe) response

pull/3655/head
Daniel Supernault 2022-09-11 02:48:47 -06:00
rodzic ca5e8cf456
commit 61d26e85cd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -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);
}