Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use spaces endpoint for search #9500

Merged
merged 3 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=309b59a665c57e226cd065f3c23721e17edbac1a
OCIS_COMMITID=526583e9bbe7f2e09527df8dad02ba2ec4068f1d
OCIS_BRANCH=master
5 changes: 4 additions & 1 deletion packages/web-app-files/src/search/sdk/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export default class List implements SearchList {
}

async search(term: string): Promise<SearchResult> {
const useSpacesEndpoint = this.store.getters.capabilities?.spaces?.enabled === true

if (!term) {
return {
totalResults: null,
Expand All @@ -47,7 +49,8 @@ export default class List implements SearchList {
const { range, results } = await this.clientService.owncloudSdk.files.search(
term,
searchLimit,
DavProperties.Default
DavProperties.Default,
useSpacesEndpoint
)

return {
Expand Down
5 changes: 4 additions & 1 deletion packages/web-app-files/src/search/sdk/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ export default class Preview implements SearchPreview {
}

const areHiddenFilesShown = this.store.state.Files?.areHiddenFilesShown
const useSpacesEndpoint = this.store.getters.capabilities?.spaces?.enabled === true

const { range, results } = await this.clientService.owncloudSdk.files.search(
term,
previewSearchLimit, // todo: add configuration option, other places need that too... needs consolidation
DavProperties.Default
DavProperties.Default,
useSpacesEndpoint
)
const resources = results.reduce((acc, result) => {
const matchingSpace = this.getMatchingSpace(result.fileInfo[DavProperty.FileParent])
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"luxon": "^2.4.0",
"marked": "^4.0.12",
"oidc-client-ts": "^2.1.0",
"owncloud-sdk": "~3.1.0-alpha.6",
"owncloud-sdk": "~3.1.0-alpha.7",
"p-queue": "^6.6.2",
"pinia": "^2.1.3",
"portal-vue": "3.0.0",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.