Skip to content

Commit

Permalink
add console log to test namespace param being passed to subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-east committed Nov 29, 2023
1 parent 92fb2c6 commit 8f519a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lib/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ Vantiq.prototype.subscribe = function(resource, name, operation, parameters, cal
return Promise.reject(new Error('Only "topics", "sources" and "types" support subscribe'));
}

if (namespace === 'test') {
return Promise.reject(new Error('Gotchu'));
}

return this.session.subscribe(path, parameters, callback, namespace);
};

Expand Down
2 changes: 1 addition & 1 deletion lib/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ VantiqSession.prototype.delete = function(path) {
return request(this, null, 'DELETE', fullpath(this, path));
};

VantiqSession.prototype.subscribe = function(path, parameters, callback, namespace = undefined) {
VantiqSession.prototype.subscribe = function(path, parameters, callback, namespace) {
if(!this.isAuthenticated()) {
return Promise.reject(new Error("Not authenticated"));
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vantiq-sdk",
"version": "1.2.0",
"version": "1.0.0",
"description": "Vantiq NodeJS SDK",
"main": "index.js",
"directories": {
Expand All @@ -26,7 +26,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/Vantiq/vantiq-sdk-node"
"url": "https://github.com/vapor-ware/vantiq-sdk-node"
},
"bugs": {
"url": "https://github.com/Vantiq/vantiq-sdk-node/issues",
Expand Down

0 comments on commit 8f519a8

Please sign in to comment.