1
0
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:
Francesco Esposito
2019-02-22 11:24:25 +01:00
parent e7d52c8168
commit 2717dc8ebd

View File

@@ -1,5 +1,6 @@
const config = require('./config'); const config = require('./config');
// utils functions
function convertTimestamp(timestamp) { function convertTimestamp(timestamp) {
return new Date(timestamp * 1000).toISOString().slice(0, 19); return new Date(timestamp * 1000).toISOString().slice(0, 19);
} }
@@ -75,7 +76,8 @@ function templateAddDeviceURL(data) {
} }
function templateAddDeviceHeader() { 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; return msg;
} }