This commit is contained in:
Marie 2025-05-07 10:48:09 +02:00
parent da54742291
commit 6b6dd372cb
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
2 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ export const paramDef = {
type: { type: 'string', nullable: true, pattern: /^[a-zA-Z\/\-*]+$/.toString().slice(1, -1) },
sort: { type: 'string', nullable: true, enum: ['+createdAt', '-createdAt', '+name', '-name', '+size', '-size', null] },
searchQuery: { type: 'string', default: '' },
notShowAll: { type: 'boolean', default: true },
showAll: { type: 'boolean', default: false },
},
required: [],
} as const;
@ -64,7 +64,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const query = this.queryService.makePaginationQuery(this.driveFilesRepository.createQueryBuilder('file'), ps.sinceId, ps.untilId)
.andWhere('file.userId = :userId', { userId: me.id });
if (ps.notShowAll) {
if (!ps.showAll) {
if (ps.folderId) {
query.andWhere('file.folderId = :folderId', { folderId: ps.folderId });
} else {

View file

@ -68,7 +68,7 @@ const sortMode = ref('+size');
const pagination = {
endpoint: 'drive/files' as const,
limit: 10,
params: computed(() => ({ sort: sortMode.value, notShowAll: false })),
params: computed(() => ({ sort: sortMode.value, showAll: true })),
offsetMode: true,
};