File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 429
429
430
430
async function init ( ) {
431
431
log ( '[init]' )
432
+
433
+ console . log ( 'checking env, ' , current_env )
434
+ if ( current_env === 'dev' ) {
435
+ console . log ( 'Im in dev, change colors yo' )
436
+ $toggleMenuIcon . style . backgroundColor = 'yellow'
437
+ }
438
+
432
439
frameNotSelected ( )
433
440
const res = await postAndWaitForReply ( 'load-parameter' , { key : "api_key" } )
434
441
const api_key = res . value
450
457
updateWebsiteID ( )
451
458
452
459
$checkAuthenticated . checked = checkAuthenticated
453
-
454
- if ( current_env === 'dev' ) {
455
- console . log ( 'Im in dev, change colors yo' )
456
- $toggleMenuIcon . style . backgroundColor = 'yellow'
457
- }
458
-
459
460
}
460
461
461
462
init ( )
509
510
async function call ( url , opts , decode ) {
510
511
log ( $api_key . value || default_api_key )
511
512
api_key_to_use = shouldUseApiKey ( ) ? $api_key . value : default_api_key
512
- let defaultHeaders = { "Authorization" : "Token " + api_key_to_use }
513
+ let defaultHeaders = {
514
+ "Authorization" : "Token " + api_key_to_use ,
515
+ "Accept" : "application/json" ,
516
+ "Content-Type" : "application/json"
517
+ }
513
518
if ( opts . headers ) {
514
519
opts . headers = Object . assign ( { } , opts . headers , defaultHeaders )
515
520
}
You can’t perform that action at this time.
0 commit comments