node-appwrite
Advanced tools
Comparing version
@@ -12,3 +12,3 @@ const URL = require('url').URL; | ||
'content-type': '', | ||
'x-sdk-version': 'appwrite:nodejs:2.2.4', | ||
'x-sdk-version': 'appwrite:nodejs:2.3.0', | ||
'X-Appwrite-Response-Format' : '0.8.0', | ||
@@ -129,3 +129,3 @@ }; | ||
let flatParams = this.flatten(params); | ||
let flatParams = Client.flatten(params); | ||
@@ -164,6 +164,6 @@ for (const key in flatParams) { | ||
} | ||
}else{ | ||
} else { | ||
throw new AppwriteException(error.response.statusText, error.response.status, error.response.data); | ||
} | ||
}else{ | ||
} else { | ||
throw new AppwriteException(error.message); | ||
@@ -174,3 +174,3 @@ } | ||
flatten(data, prefix = '') { | ||
static flatten(data, prefix = '') { | ||
let output = {}; | ||
@@ -183,5 +183,4 @@ | ||
if (Array.isArray(value)) { | ||
output = Object.assign(output, this.flatten(value, finalKey)); // @todo: handle name collision here if needed | ||
} | ||
else { | ||
output = Object.assign(output, Client.flatten(value, finalKey)); // @todo: handle name collision here if needed | ||
} else { | ||
output[finalKey] = value; | ||
@@ -195,2 +194,2 @@ } | ||
module.exports = Client; | ||
module.exports = Client; |
@@ -5,3 +5,3 @@ { | ||
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", | ||
"version": "2.2.4", | ||
"version": "2.3.0", | ||
"license": "BSD-3-Clause", | ||
@@ -8,0 +8,0 @@ "main": "./index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
188772
00
-100%