Remove album folder in day call
parent
80f6a491d2
commit
7dd758ee4d
|
@ -89,6 +89,8 @@ class ApiController extends Controller
|
|||
{
|
||||
// Get the folder to show
|
||||
$uid = $this->getUid();
|
||||
|
||||
// Get the folder to show
|
||||
$folder = null;
|
||||
|
||||
try {
|
||||
|
@ -97,15 +99,10 @@ class ApiController extends Controller
|
|||
return new JSONResponse(['message' => $e->getMessage()], Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
||||
// Params
|
||||
$recursive = null === $this->request->getParam('folder');
|
||||
$archive = null !== $this->request->getParam('archive');
|
||||
|
||||
// Remove folder if album
|
||||
// Permissions will be checked during the transform
|
||||
if ($this->request->getParam('album')) {
|
||||
$folder = null;
|
||||
}
|
||||
|
||||
// Run actual query
|
||||
try {
|
||||
$list = $this->timelineQuery->getDays(
|
||||
|
@ -172,12 +169,17 @@ class ApiController extends Controller
|
|||
}
|
||||
|
||||
// Get the folder to show
|
||||
$folder = $this->getRequestFolder();
|
||||
$folder = null;
|
||||
|
||||
try {
|
||||
$folder = $this->getRequestFolder();
|
||||
} catch (\Exception $e) {
|
||||
return new JSONResponse(['message' => $e->getMessage()], Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
||||
// Params
|
||||
$recursive = null === $this->request->getParam('folder');
|
||||
$archive = null !== $this->request->getParam('archive');
|
||||
if (null === $folder) {
|
||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
||||
// Run actual query
|
||||
try {
|
||||
|
@ -825,6 +827,11 @@ class ApiController extends Controller
|
|||
/** Get the Folder object relevant to the request */
|
||||
private function getRequestFolder()
|
||||
{
|
||||
// Albums have no folder
|
||||
if ($this->request->getParam('album')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Public shared folder
|
||||
if ($token = $this->getShareToken()) {
|
||||
$share = $this->shareManager->getShareByToken($token)->getNode(); // throws exception if not found
|
||||
|
|
|
@ -526,7 +526,6 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
|
|||
"album",
|
||||
`${this.$route.params.user}/${this.$route.params.name}`
|
||||
);
|
||||
query.set("fields", "basename,mimetype");
|
||||
}
|
||||
|
||||
// Favorites
|
||||
|
|
Loading…
Reference in New Issue