mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-06 03:56:56 +00:00
up
This commit is contained in:
parent
da54742291
commit
6b6dd372cb
2 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue