mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	refactor setting
This commit is contained in:
		@@ -318,7 +318,7 @@ class APICallMixin:
 | 
				
			|||||||
    """
 | 
					    """
 | 
				
			||||||
    API_METHOD = 'https'
 | 
					    API_METHOD = 'https'
 | 
				
			||||||
    API_URL_SETTING = None
 | 
					    API_URL_SETTING = None
 | 
				
			||||||
    API_PASSWORD_SETTING = None
 | 
					    API_TOKEN_SETTING = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    API_TOKEN = 'Bearer'
 | 
					    API_TOKEN = 'Bearer'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -343,7 +343,7 @@ class APICallMixin:
 | 
				
			|||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def api_headers(self):
 | 
					    def api_headers(self):
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            self.API_TOKEN: self.get_globalsetting(self.API_PASSWORD_SETTING),
 | 
					            self.API_TOKEN: self.get_globalsetting(self.API_TOKEN_SETTING),
 | 
				
			||||||
            'Content-Type': 'application/json'
 | 
					            'Content-Type': 'application/json'
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user