@@ -208,13 +208,13 @@ WOQLClient.prototype.userOrganization = function () {
208208
209209/**
210210 * Gets the database's details
211- * @param {string } [dbId ] - the datbase id
212- * @returns {object } the database description object //getDatabaseInfo
211+ * @param {string } [dbName ] - the datbase name
212+ * @returns {object } the database description object
213213 */
214- WOQLClient . prototype . databaseInfo = function ( dbId ) {
214+ WOQLClient . prototype . databaseInfo = function ( dbName ) {
215215 // const dbIdVal = dbId || this.db();
216216 // const orgIdVal = orgId || this.organization()
217- const database = this . databases ( ) . find ( ( element ) => element . name === dbId ) ;
217+ const database = this . databases ( ) . find ( ( element ) => element . name === dbName ) ;
218218 return database || { } ;
219219} ;
220220
@@ -1518,7 +1518,7 @@ WOQLClient.prototype.getJSONDiff = function (before, after, options) {
15181518 * })
15191519 */
15201520WOQLClient . prototype . getVersionObjectDiff = function ( dataVersion , jsonObject , id , options ) {
1521- if ( typeof jsonObject !== 'object' || typeof dataVersion !== 'string' ) {
1521+ if ( typeof jsonObject !== 'object' || typeof dataVersion !== 'string' || typeof id !== 'string' ) {
15221522 const errmsg = 'Parameters error - you must specify a valid jsonObject document and valid branch or commit' ;
15231523
15241524 return Promise . reject (
@@ -1529,11 +1529,9 @@ WOQLClient.prototype.getVersionObjectDiff = function (dataVersion, jsonObject, i
15291529 const payload = {
15301530 after : jsonObject ,
15311531 before_data_version : dataVersion ,
1532+ id,
15321533 ...opt ,
15331534 } ;
1534- if ( id ) {
1535- payload . id = id ;
1536- }
15371535 return this . dispatch (
15381536 CONST . POST ,
15391537 this . connectionConfig . diffURL ( ) ,
0 commit comments