Set CORS header fields to support Halcyon

This commit is contained in:
Michael 2021-06-24 18:02:29 +00:00
parent d798d0bcd4
commit 89608d5844
2 changed files with 29 additions and 7 deletions

View file

@ -44,10 +44,14 @@ class Relationships extends BaseApi
'id' => [],
]);
if (empty($request['id']) || !is_array($request['id'])) {
if (empty($request['id'])) {
DI::mstdnError()->UnprocessableEntity();
}
if (!is_array($request['id'])) {
$request['id'] = [$request['id']];
}
$relationsships = [];
foreach ($request['id'] as $id) {