mirror of
https://github.com/friendica/friendica
synced 2025-04-27 20:30:13 +00:00
Adding and removing of pictures via API is now possible
This commit is contained in:
parent
a56d2f2eb8
commit
98aed4dde3
3 changed files with 101 additions and 37 deletions
|
@ -721,7 +721,7 @@ class Media
|
|||
*
|
||||
* @param int $uri_id URI id
|
||||
* @param array $types Media types
|
||||
* @return bool Whether media attachment exists
|
||||
* @return bool result of deletion
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function deleteByURIId(int $uri_id, array $types = []): bool
|
||||
|
@ -735,6 +735,18 @@ class Media
|
|||
return DBA::delete('post-media', $condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete media by id
|
||||
*
|
||||
* @param int $id media id
|
||||
* @return bool result of deletion
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function deleteById(int $id): bool
|
||||
{
|
||||
return DBA::delete('post-media', ['id' => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Split the attachment media in the three segments "visual", "link" and "additional"
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue