Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.mdns.eu/nextcloud/passwords-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius David Wieschollek <passwords.public@mdns.eu>2020-12-16 01:41:06 +0300
committerMarius David Wieschollek <passwords.public@mdns.eu>2020-12-16 01:41:06 +0300
commit835d5f619844d0e7ab4ccf8e9a28abb642c8d530 (patch)
treeec0afebbe305ec4b191d722299d770849ec8b431
parent6b3b25ccdf3d6de035e7accc2acc07eb533c2641 (diff)
Fix incorrect loading of enhanced models
Signed-off-by: Marius David Wieschollek <passwords.public@mdns.eu>
-rw-r--r--src/ClassLoader/EnhancedClassLoader.js6
-rw-r--r--src/Model/Folder/EnhancedFolder.js8
-rw-r--r--src/Model/Password/EnhancedPassword.js10
-rw-r--r--src/Model/Tag/EnhancedTag.js4
4 files changed, 14 insertions, 14 deletions
diff --git a/src/ClassLoader/EnhancedClassLoader.js b/src/ClassLoader/EnhancedClassLoader.js
index 04dfa2e..d3078b5 100644
--- a/src/ClassLoader/EnhancedClassLoader.js
+++ b/src/ClassLoader/EnhancedClassLoader.js
@@ -11,9 +11,9 @@ export default class EnhancedClassLoader extends DefaultClassLoader {
*/
_getDefaultClasses() {
let classes = super._getDefaultClasses();
- classes.model.password = EnhancedPassword;
- classes.model.folder = EnhancedFolder;
- classes.model.tag = EnhancedTag;
+ classes.model.password = (d) => { return new EnhancedPassword(d, this.getInstance('api')); };
+ classes.model.folder = (d) => { return new EnhancedFolder(d, this.getInstance('api')); };
+ classes.model.tag = (d) => { return new EnhancedTag(d, this.getInstance('api')); };
return classes;
}
diff --git a/src/Model/Folder/EnhancedFolder.js b/src/Model/Folder/EnhancedFolder.js
index fbec6ce..fc03869 100644
--- a/src/Model/Folder/EnhancedFolder.js
+++ b/src/Model/Folder/EnhancedFolder.js
@@ -22,7 +22,7 @@ export default class EnhancedFolder extends Folder {
/**
*
- * @returns {Promise<FolderCollection[]>}
+ * @returns {Promise<FolderCollection>}
*/
async fetchRevisions() {
if(this.getProperty('revisions') === undefined) {
@@ -34,7 +34,7 @@ export default class EnhancedFolder extends Folder {
/**
*
- * @returns {Promise<PasswordCollection[]>}
+ * @returns {Promise<PasswordCollection>}
*/
async fetchPasswords() {
if(this.getProperty('passwords') === undefined) {
@@ -46,7 +46,7 @@ export default class EnhancedFolder extends Folder {
/**
*
- * @returns {Promise<FolderCollection[]>}
+ * @returns {Promise<FolderCollection>}
*/
async fetchFolders() {
if(this.getProperty('folders') === undefined) {
@@ -58,7 +58,7 @@ export default class EnhancedFolder extends Folder {
/**
*
- * @returns {Promise<Folder[]>}
+ * @returns {Promise<Folder>}
*/
async fetchParent() {
if(this.getProperty('parent') === undefined) {
diff --git a/src/Model/Password/EnhancedPassword.js b/src/Model/Password/EnhancedPassword.js
index a2e3db5..a73f678 100644
--- a/src/Model/Password/EnhancedPassword.js
+++ b/src/Model/Password/EnhancedPassword.js
@@ -63,35 +63,35 @@ export default class EnhancedPassword extends Password {
/**
*
- * @returns {Promise<Password[]>}
+ * @returns {Promise<PasswordCollection>}
*/
async fetchRevisions() {
}
/**
*
- * @returns {Promise<Share[]>}
+ * @returns {Promise<Share>}
*/
async fetchShare() {
}
/**
*
- * @returns {Promise<Share[]>}
+ * @returns {Promise<ShareCollection>}
*/
async fetchShares() {
}
/**
*
- * @returns {Promise<Tag[]>}
+ * @returns {Promise<TagCollection>}
*/
async fetchTags() {
}
/**
*
- * @returns {Promise<Folder[]>}
+ * @returns {Promise<FolderCollection>}
*/
async fetchFolder() {
}
diff --git a/src/Model/Tag/EnhancedTag.js b/src/Model/Tag/EnhancedTag.js
index 29b9038..0af7e78 100644
--- a/src/Model/Tag/EnhancedTag.js
+++ b/src/Model/Tag/EnhancedTag.js
@@ -22,7 +22,7 @@ export default class EnhancedTag extends Tag {
/**
*
- * @returns {Promise<Tag[]>}
+ * @returns {Promise<TagCollection>}
*/
async fetchRevisions() {
@@ -30,7 +30,7 @@ export default class EnhancedTag extends Tag {
/**
*
- * @returns {Promise<Password[]>}
+ * @returns {Promise<PasswordCollection>}
*/
async fetchPasswords() {