Minor improvement to NextCloud Node

This commit is contained in:
Jan Oberhauser 2021-01-23 12:57:30 +01:00
parent 2ca9c6de7d
commit 1cfdae389e
2 changed files with 9 additions and 5 deletions

View file

@ -695,7 +695,6 @@ export class NextCloud implements INodeType {
}
} else if (resource === 'user') {
if (operation === 'create') {
// ----------------------------------
// user:create
@ -774,7 +773,12 @@ export class NextCloud implements INodeType {
if (err) {
return reject(err);
}
resolve(data as IDataObject);
if (data.ocs.meta.status !== 'ok') {
return reject(new Error(data.ocs.meta.message));
}
resolve(data.ocs.data as IDataObject);
});
});