@@ -42,10 +42,13 @@ async function getData(options, log, dashboardDir, folderDir, datasourceDir, das
4242 const dataSourcesRequest = await axios ( {
4343 method : 'get' ,
4444 url : `${ options . protocol } ://${ options . host } :${ options . port } /api/datasources` ,
45+ headers : { Authorization : `Bearer ${ options . apiKey } ` } ,
46+ /*
4547 auth: {
4648 username: options.username,
4749 password: options.pass,
4850 },
51+ */
4952 responseType : 'json' ,
5053 httpsAgent : new https . Agent ( {
5154 rejectUnauthorized : options . signedCertificates ,
@@ -67,8 +70,7 @@ async function getData(options, log, dashboardDir, folderDir, datasourceDir, das
6770 const dashBoardsRequest = await axios ( {
6871 method : 'get' ,
6972 url : `${ options . protocol } ://${ options . host } :${ options . port } /api/search` ,
70- // eslint-disable-next-line quote-props
71- headers : { 'Authorization' : `Bearer ${ options . apiKey } ` } ,
73+ headers : { Authorization : `Bearer ${ options . apiKey } ` } ,
7274 responseType : 'json' ,
7375 httpsAgent : new https . Agent ( {
7476 rejectUnauthorized : options . signedCertificates ,
@@ -94,8 +96,7 @@ async function getData(options, log, dashboardDir, folderDir, datasourceDir, das
9496 dashBoardRequest = await axios ( {
9597 method : 'get' ,
9698 url : `${ options . protocol } ://${ options . host } :${ options . port } /api/dashboards/uid/${ dashBoardData [ 0 ] } ` ,
97- // eslint-disable-next-line quote-props
98- headers : { 'Authorization' : `Bearer ${ options . apiKey } ` } ,
99+ headers : { Authorization : `Bearer ${ options . apiKey } ` } ,
99100 responseType : 'json' ,
100101 httpsAgent : new https . Agent ( {
101102 rejectUnauthorized : options . signedCertificates
@@ -155,8 +156,7 @@ async function getData(options, log, dashboardDir, folderDir, datasourceDir, das
155156 const foldersRequest = await axios ( {
156157 method : 'get' ,
157158 url : `${ options . protocol } ://${ options . host } :${ options . port } /api/folders` ,
158- // eslint-disable-next-line quote-props
159- headers : { 'Authorization' : `Bearer ${ options . apiKey } ` } ,
159+ headers : { Authorization : `Bearer ${ options . apiKey } ` } ,
160160 responseType : 'json' ,
161161 httpsAgent : new https . Agent ( {
162162 rejectUnauthorized : options . signedCertificates ,
0 commit comments