mirror of
https://github.com/FuzzyGrim/Yamtrack.git
synced 2026-06-28 06:45:58 +00:00
validate hardcover api setting #1352
This commit is contained in:
@@ -18,6 +18,7 @@ from decouple import (
|
||||
undefined,
|
||||
)
|
||||
from django.core.cache import CacheKeyWarning
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
||||
BASE_URL = config("BASE_URL", default=None)
|
||||
if BASE_URL:
|
||||
@@ -424,6 +425,10 @@ HARDCOVER_API = config(
|
||||
"j4MVAEi_-w2N7DuiMgAxkfVc6RuKd88AHrOyzF5xLyU",
|
||||
),
|
||||
)
|
||||
HARDCOVER_API = HARDCOVER_API.strip()
|
||||
if not HARDCOVER_API.startswith("Bearer "):
|
||||
msg = "HARDCOVER_API must start with 'Bearer '."
|
||||
raise ImproperlyConfigured(msg)
|
||||
|
||||
COMICVINE_API = config(
|
||||
"COMICVINE_API",
|
||||
|
||||
Reference in New Issue
Block a user