Skip to content

Commit 20371aa

Browse files
committed
fix(files_external): use root id property instead of internal attributes
Root attributes must not be accessed by the internal `attributes`. Trying to do so will return `undefined`, so instead use the root `id` property of nodes. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent dd2c8d9 commit 20371aa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/files_external/src/actions/enterCredentialsAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ addPasswordConfirmationInterceptors(axios)
3535
async function setCredentials(node: INode, login: string, password: string): Promise<null | true> {
3636
const configResponse = await axios.request({
3737
method: 'PUT',
38-
url: generateUrl('apps/files_external/userglobalstorages/{id}', { id: node.attributes.id }),
38+
url: generateUrl('apps/files_external/userglobalstorages/{id}', { id: node.id }),
3939
confirmPassword: PwdConfirmationMode.Strict,
4040
data: {
4141
backendOptions: { user: login, password },

apps/files_external/src/actions/inlineStorageCheckAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const action: IFileAction = {
4747

4848
let config: IStorage | undefined
4949
try {
50-
const { data } = await getStatus(node.attributes.id, node.attributes.scope === 'system')
50+
const { data } = await getStatus(node.id, node.attributes.scope === 'system')
5151
config = data
5252
node.attributes.config = config
5353
emit('files:node:updated', node)

0 commit comments

Comments
 (0)