mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02:00
API: Parameter cleanup
This commit is contained in:
parent
453e6a9d75
commit
e3d227f3c9
22 changed files with 147 additions and 80 deletions
|
@ -41,12 +41,16 @@ class Note extends BaseApi
|
|||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$request = self::getRequest([
|
||||
'comment' => '',
|
||||
]);
|
||||
|
||||
$cdata = Contact::getPublicAndUserContacID($parameters['id'], $uid);
|
||||
if (empty($cdata['user'])) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
}
|
||||
|
||||
DBA::update('contact', ['info' => $_REQUEST['comment'] ?? ''], ['id' => $cdata['user']]);
|
||||
DBA::update('contact', ['info' => $request['comment']], ['id' => $cdata['user']]);
|
||||
|
||||
System::jsonExit(DI::mstdnRelationship()->createFromContactId($parameters['id'], $uid)->toArray());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue