mirror of
https://github.com/franjsco/trackmyd-bot
synced 2025-02-16 11:31:46 +01:00
fix auth header
This commit is contained in:
parent
e7d52c8168
commit
2717dc8ebd
6
utils.js
6
utils.js
@ -1,5 +1,6 @@
|
||||
const config = require('./config');
|
||||
|
||||
// utils functions
|
||||
function convertTimestamp(timestamp) {
|
||||
return new Date(timestamp * 1000).toISOString().slice(0, 19);
|
||||
}
|
||||
@ -75,7 +76,8 @@ function templateAddDeviceURL(data) {
|
||||
}
|
||||
|
||||
function templateAddDeviceHeader() {
|
||||
const msg = JSON.stringify(config.api.headers);
|
||||
const head = config.api.headers;
|
||||
const msg = `Authorization: ${head.Authorization} \nContent-Type: ${head['Content-Type']}`;
|
||||
return msg;
|
||||
}
|
||||
|
||||
@ -106,4 +108,4 @@ module.exports.templateError = templateError;
|
||||
module.exports.templateDeviceNotFound = templateDeviceNotFound;
|
||||
module.exports.templateAddDeviceURL = templateAddDeviceURL;
|
||||
module.exports.templateAddDeviceHeader = templateAddDeviceHeader;
|
||||
module.exports.templateAddDeviceBody = templateAddDeviceBody;
|
||||
module.exports.templateAddDeviceBody = templateAddDeviceBody;
|
Loading…
x
Reference in New Issue
Block a user