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 527eae5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit 527eae5

Please sign in to comment.