Skip to content

Commit

Permalink
Fix:query
Browse files Browse the repository at this point in the history
  • Loading branch information
penginn-net committed Mar 27, 2024
1 parent 875e3aa commit 4101d42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/backend/src/core/SearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,12 @@ export class SearchService {
query.andWhere('user.host = :host', { host: opts.host });
}
}

if (opts.fileOption) {
if (opts.fileOption === 'file-only') {
query.andWhere('note.fileIds != \'{}\'');
} else if (opts.fileOption === 'no-file') {
query.andWhere('note.fileIds == \'{}\'');
query.andWhere('note.fileIds = :fIds', { fIds: '{}' });
}
}
this.queryService.generateVisibilityQuery(query, me);
Expand Down

0 comments on commit 4101d42

Please sign in to comment.