Skip to content

Commit

Permalink
(bluefox) change interface of getDevices functions
Browse files Browse the repository at this point in the history
(bluefox) change interface of createChannel functions
  • Loading branch information
GermanBluefox committed Jul 27, 2017
1 parent ce32fb7 commit 8a3b7fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/adapter.js
Expand Up @@ -1710,7 +1710,7 @@ function Adapter(options) {
native: _native
};

that.setObject(channelName, obj, options, callback);
that.setObjectNotExists(channelName, obj, options, callback);
};

that.createState = function createState(parentDevice, parentChannel, stateName, roleOrCommon, _native, options, callback) {
Expand Down Expand Up @@ -2183,11 +2183,12 @@ function Adapter(options) {
});
};

that.getDevices = function getDevices(callback, options) {
that.getDevices = function getDevices(options, callback) {

This comment has been minimized.

Copy link
@Apollon77

Apollon77 Jul 27, 2017

Collaborator

Willst Du wirklich die Reihenfolge drehen? Bedeutet: ALLE Adapter die das nutzen gehen nicht mehr! Finde ich sehr gefährlich weil es inkompatibel ist!

This comment has been minimized.

Copy link
@Apollon77

Apollon77 Jul 27, 2017

Collaborator

Im Code musst Du jetzt aber anders agieren und ggf auch hier Parameter zurückdrehen.

if (typeof options === 'function') {
callback = options;
options = null;
}

that.objects.getObjectView('system', 'device', {startkey: that.namespace + '.', endkey: that.namespace + '.\u9999'}, options, function (err, obj) {
if (callback) {
if (obj.rows.length) {
Expand Down

3 comments on commit 8a3b7fb

@Apollon77
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

siehe Kommentar. ACHTUNG INKOMPATIBEL!!!

@GermanBluefox
Copy link
Contributor Author

@GermanBluefox GermanBluefox commented on 8a3b7fb Jul 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super, dass mehr Augen auf den Code achten :)
24b5c4c

@Apollon77
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gern doch :-)

Please sign in to comment.