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 429429
430430async function init ( ) {
431431 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+
432439 frameNotSelected ( )
433440 const res = await postAndWaitForReply ( 'load-parameter' , { key : "api_key" } )
434441 const api_key = res . value
450457 updateWebsiteID ( )
451458
452459 $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-
459460}
460461
461462init ( )
509510async function call ( url , opts , decode ) {
510511 log ( $api_key . value || default_api_key )
511512 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+ }
513518 if ( opts . headers ) {
514519 opts . headers = Object . assign ( { } , opts . headers , defaultHeaders )
515520 }
You can’t perform that action at this time.
0 commit comments