Skip to content

Commit f33a865

Browse files
committed
review docs
1 parent 53296e3 commit f33a865

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const bankerSchema = [
100100
"@type":"Class",
101101
"@id":"Person",
102102
"@key":{
103-
"@type":"Hash",
103+
"@type":"Lexical",
104104
"@fields":[
105105
"name"
106106
]

lib/woqlClient.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
15201520
WOQLClient.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

Comments
 (0)