1
0
Fork 0

Add Photo album cache flushes to Friendica Photo endpoints

This commit is contained in:
Hank Grabowski 2022-12-13 13:27:23 -05:00
commit 800f94495b
5 changed files with 5 additions and 1 deletions

View file

@ -60,7 +60,7 @@ class Delete extends BaseApi
// to the user and the contacts of the users (drop_items() do all the necessary magic to avoid orphans in database and federate deletion)
$condition = ['uid' => $uid, 'resource-id' => $request['photo_id'], 'post-type' => Item::PT_IMAGE, 'origin' => true];
Item::deleteForUser($condition, $uid);
Photo::clearAlbumCache($uid);
$result = ['result' => 'deleted', 'message' => 'photo with id `' . $request['photo_id'] . '` has been deleted from server.'];
$this->response->exit('photo_delete', ['$result' => $result], $this->parameters['extension'] ?? null);
} else {