mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-02 20:44:30 +00:00
Update ApiV1Controller update_credentials endpoint to support app (_pe) response
This commit is contained in:
parent
ca5e8cf456
commit
61d26e85cd
1 changed files with 7 additions and 3 deletions
|
@ -432,9 +432,13 @@ class ApiV1Controller extends Controller
|
||||||
MediaSyncLicensePipeline::dispatch($user->id, $request->input('license'));
|
MediaSyncLicensePipeline::dispatch($user->id, $request->input('license'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = AccountService::getMastodon($user->profile_id);
|
if($request->has(self::PF_API_ENTITY_KEY)) {
|
||||||
$res['bio'] = strip_tags($res['note']);
|
$res = AccountService::get($user->profile_id, true);
|
||||||
$res = array_merge($res, $other);
|
} else {
|
||||||
|
$res = AccountService::getMastodon($user->profile_id, true);
|
||||||
|
$res['bio'] = strip_tags($res['note']);
|
||||||
|
$res = array_merge($res, $other);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->json($res);
|
return $this->json($res);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue