mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-03 13:58:47 +00:00
refactor setting
This commit is contained in:
parent
62394c4a82
commit
f59b59401f
@ -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'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user