]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Friendica/Photoalbum/Update.php
Fix Friendica API Photo Album list documentation to reflect endpoint
[friendica.git] / src / Module / Api / Friendica / Photoalbum / Update.php
index 2c1e5e878623264f2bc1211da548e82c1acf70f2..3fa01fe1b495b0434128d565e937c63a468bf061 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -32,12 +32,12 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
  */
 class Update extends BaseApi
 {
-       protected function rawContent(array $request = [])
+       protected function post(array $request = [])
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
 
-               $request = self::getRequest([
+               $request = $this->getRequest([
                        'album'     => '', // Current album name
                        'album_new' => '', // New album name
                ], $request);
@@ -58,6 +58,7 @@ class Update extends BaseApi
 
                // return success of updating or error message
                if ($result) {
+                       Photo::clearAlbumCache($uid);
                        $answer = ['result' => 'updated', 'message' => 'album `' . $request['album'] . '` with all containing photos has been renamed to `' . $request['album_new'] . '`.'];
                        $this->response->exit('photoalbum_update', ['$result' => $answer], $this->parameters['extension'] ?? null);
                } else {