Token auth in researchSync and UPSdisplay

This commit is contained in:
Danielv123 committed 2018-04-25 12:55:03 +02:00
1 parent a26189947d
commit 20e66cbd40
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ class UPSdisplay {
let UPS = Math.round(ticksInPeriod / (timePeriod/1000)); let UPS = Math.round(ticksInPeriod / (timePeriod/1000));
// console.log("UPS: " + UPS); // console.log("UPS: " + UPS);
try{ try{
needle.post(this.config.masterIP+':'+this.config.masterPort+'/api/editSlaveMeta', {instanceID: this.config.unique, password: this.config.clientPassword, meta: {UPS:UPS}}, function(err, resp) { needle.post(this.config.masterIP+':'+this.config.masterPort+'/api/editSlaveMeta', {instanceID: this.config.unique, password: this.config.clientPassword, meta: {UPS:UPS}}, {headers: {'x-access-token': this.config.masterAuthToken}}, function(err, resp) {
// success? // success?
}); });
} catch (err){ } catch (err){
+1 -1
View File
@@ -83,7 +83,7 @@ class ResearchSync {
instanceID: this.config.unique, instanceID: this.config.unique,
password: this.config.clientPassword, password: this.config.clientPassword,
meta: {research: this.research} meta: {research: this.research}
}, function (err, resp) { }, {headers: {'x-access-token': this.config.masterAuthToken}}, function (err, resp) {
// success? // success?
}); });
}); });