feat(api): load config using shared helpers
- add django settings module documentation - use default for previously required fields BREAKING CHANGE: The API command line interface require the configuration file to be present. The default configuration file path is `/etc/airtime/airtime.conf`
This commit is contained in:
parent
9af717ef7f
commit
2dcc654b70
12 changed files with 119 additions and 146 deletions
|
@ -55,7 +55,7 @@ def check_authorization_header(request):
|
|||
|
||||
if auth_header.startswith("Api-Key"):
|
||||
token = auth_header.split()[1]
|
||||
if token == settings.CONFIG.get("general", "api_key"):
|
||||
if token == settings.CONFIG.general.api_key:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue