mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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>
This commit is contained in:
parent
85c0dcf136
commit
7ef66a6199
2 changed files with 2 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ addPasswordConfirmationInterceptors(axios)
|
|||
async function setCredentials(node: INode, login: string, password: string): Promise<null | true> {
|
||||
const configResponse = await axios.request({
|
||||
method: 'PUT',
|
||||
url: generateUrl('apps/files_external/userglobalstorages/{id}', { id: node.attributes.id }),
|
||||
url: generateUrl('apps/files_external/userglobalstorages/{id}', { id: node.id }),
|
||||
confirmPassword: PwdConfirmationMode.Strict,
|
||||
data: {
|
||||
backendOptions: { user: login, password },
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export const action: IFileAction = {
|
|||
|
||||
let config: IStorage | undefined
|
||||
try {
|
||||
const { data } = await getStatus(node.attributes.id, node.attributes.scope === 'system')
|
||||
const { data } = await getStatus(node.id, node.attributes.scope === 'system')
|
||||
config = data
|
||||
node.attributes.config = config
|
||||
emit('files:node:updated', node)
|
||||
|
|
|
|||
Loading…
Reference in a new issue