mirror of
https://github.com/friendica/friendica
synced 2025-04-26 03:50:12 +00:00
Fix id/uri-id chaos in API calls
This commit is contained in:
parent
755bbac496
commit
ef309cbcd3
9 changed files with 18 additions and 18 deletions
|
@ -43,11 +43,11 @@ class Card extends BaseApi
|
|||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
if (!$post = Post::selectOriginal(['id'], ['uri-id' => $this->parameters['id'], 'uid' => [0, $uid]])) {
|
||||
if (!$post = Post::selectOriginal(['uri-id'], ['uri-id' => $this->parameters['id'], 'uid' => [0, $uid]])) {
|
||||
throw new HTTPException\NotFoundException('Item with URI ID ' . $this->parameters['id'] . ' not found' . ($uid ? ' for user ' . $uid : '.'));
|
||||
}
|
||||
|
||||
$card = DI::mstdnCard()->createFromUriId($post['id']);
|
||||
$card = DI::mstdnCard()->createFromUriId($post['uri-id']);
|
||||
|
||||
System::jsonExit($card->toArray());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue