mirror of
https://github.com/franjsco/trackmyd-bot
synced 2025-06-05 22:19:29 +02:00
fix auth header
This commit is contained in:
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;
|
Reference in New Issue
Block a user