mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
Merge pull request #14037 from MrPetovan/bug/warnings
Add expected field 'uri-id' in Mastodon\Statuses\Bookmark
This commit is contained in:
commit
f78b0e7c51
1 changed files with 1 additions and 2 deletions
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
namespace Friendica\Module\Api\Mastodon\Statuses;
|
namespace Friendica\Module\Api\Mastodon\Statuses;
|
||||||
|
|
||||||
use Friendica\Core\System;
|
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
|
@ -54,7 +53,7 @@ class Bookmark extends BaseApi
|
||||||
if ($item['uid'] == 0) {
|
if ($item['uid'] == 0) {
|
||||||
$stored = Item::storeForUserByUriId($item['uri-id'], $uid, ['post-reason' => Item::PR_ACTIVITY]);
|
$stored = Item::storeForUserByUriId($item['uri-id'], $uid, ['post-reason' => Item::PR_ACTIVITY]);
|
||||||
if (!empty($stored)) {
|
if (!empty($stored)) {
|
||||||
$item = Post::selectFirst(['id', 'gravity'], ['id' => $stored]);
|
$item = Post::selectFirst(['id', 'uri-id', 'gravity'], ['id' => $stored]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
$this->logAndJsonError(404, $this->errorFactory->RecordNotFound());
|
$this->logAndJsonError(404, $this->errorFactory->RecordNotFound());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue