Skip to content

Commit 84efb28

Browse files
committed
refactor: do not use deprecated exports
Signed-off-by: Elizabeth Danzberger <[email protected]>
1 parent 2cb1c7f commit 84efb28

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/view/FilesAppIntegration.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import axios from '@nextcloud/axios'
1111
import { emit } from '@nextcloud/event-bus'
1212
import { getCurrentDirectory } from '../helpers/filesApp.js'
1313
import {
14-
davGetClient,
15-
davGetDefaultPropfind,
16-
davResultToNode,
17-
davRootPath,
18-
} from '@nextcloud/files'
14+
getClient,
15+
getDefaultPropfind,
16+
resultToNode,
17+
defaultRootPath,
18+
} from '@nextcloud/files/dav'
1919
import SaveAs from '../components/Modal/SaveAs.vue'
2020

2121
export default {
@@ -521,12 +521,12 @@ export default {
521521

522522
try {
523523
const path = this.filePath + '/' + this.fileName
524-
const client = davGetClient()
525-
const results = await client.getDirectoryContents(`${davRootPath}${path}`, {
524+
const client = getClient()
525+
const results = await client.getDirectoryContents(`${defaultRootPath}${path}`, {
526526
details: true,
527-
data: davGetDefaultPropfind(),
527+
data: getDefaultPropfind(),
528528
})
529-
const nodes = results.data.map((result) => davResultToNode(result))
529+
const nodes = results.data.map((result) => resultToNode(result))
530530

531531
this.fileNode = nodes[0] ?? null
532532
} catch (e) {
@@ -551,12 +551,12 @@ export default {
551551

552552
try {
553553
const path = `${this.filePath}/${basename}`
554-
const client = davGetClient()
555-
const results = await client.getDirectoryContents(`${davRootPath}${path}`, {
554+
const client = getClient()
555+
const results = await client.getDirectoryContents(`${defaultRootPath}${path}`, {
556556
details: true,
557-
data: davGetDefaultPropfind(),
557+
data: getDefaultPropfind(),
558558
})
559-
const nodes = results.data.map((result) => davResultToNode(result))
559+
const nodes = results.data.map((result) => resultToNode(result))
560560

561561
if (nodes[0]) {
562562
console.debug('[FilesAppIntegration] Emitting files:node:created for', basename)

0 commit comments

Comments
 (0)