pull/221/head
Varun Patil 2022-11-15 21:45:52 -08:00
parent e73ee66014
commit e9f67b24e6
2 changed files with 4 additions and 2 deletions

View File

@ -84,6 +84,7 @@ class ArchiveController extends ApiBase
if ($parent->getName() === \OCA\Memories\Util::$ARCHIVE_FOLDER) {
$isArchived = true;
break;
}
@ -98,7 +99,8 @@ class ArchiveController extends ApiBase
$unarchive = isset($body['archive']) && false === $body['archive'];
if ($isArchived && !$unarchive) {
return new JSONResponse(['message' => 'File already archived'], Http::STATUS_BAD_REQUEST);
} else if (!$isArchived && $unarchive) {
}
if (!$isArchived && $unarchive) {
return new JSONResponse(['message' => 'File not archived'], Http::STATUS_BAD_REQUEST);
}

View File

@ -221,7 +221,7 @@ trait TimelineQueryDays
/**
* The root folder id for the folder.
* We fallback to this if rootid is not found
* We fallback to this if rootid is not found.
*/
$defaultRootId = 0;