gun-eth 1.2.5 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -12
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -25,18 +25,13 @@ Gun.chain.setToken = function (token) {
|
|
|
25
25
|
return this;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
msg.headers = {
|
|
36
|
-
token: customToken,
|
|
37
|
-
};
|
|
38
|
-
to.next(msg); // passa al prossimo middleware
|
|
39
|
-
});
|
|
28
|
+
ctx.on("put", function (msg) {
|
|
29
|
+
const to = this.to;
|
|
30
|
+
// Usa il token personalizzato
|
|
31
|
+
msg.headers = {
|
|
32
|
+
token: customToken,
|
|
33
|
+
};
|
|
34
|
+
to.next(msg); // passa al prossimo middleware
|
|
40
35
|
});
|
|
41
36
|
|
|
42
37
|
// Aggiungi il metodo alla catena di Gun
|