Update AP Profile Transformer, fix movedTo attribute

pull/4996/head
Daniel Supernault 1 year ago
parent 25f3fa06af
commit 63100fe950
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -65,7 +65,10 @@ class ProfileTransformer extends Fractal\TransformerAbstract
} }
if ($profile->moved_to_profile_id) { if ($profile->moved_to_profile_id) {
$res['movedTo'] = AccountService::get($profile->moved_to_profile_id)['url']; $movedTo = AccountService::get($profile->moved_to_profile_id);
if ($movedTo && isset($movedTo['url'], $movedTo['id'])) {
$res['movedTo'] = $movedTo['url'];
}
} }
} }

Loading…
Cancel
Save