Skip to content

Commit

Permalink
Add jwt_secret_key and environment options to api config with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Jun 16, 2021
1 parent 0d38b4f commit b452e15
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/webqueue2api/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@ def generate_random_string(length=16) -> str:

@dataclass
class Configuraton:
pass
config = Configuraton(
"""Stores API configuration.
Args:
jwt_secret_key (str): The key used to confirm JWT validity.
environment (str): The type of environment to run in. "prod" or "dev"
"""
jwt_secret_key: str
environment: str

config = Configuraton(
jwt_secret_key = generate_random_string(),
environment = "prod"
)

0 comments on commit b452e15

Please sign in to comment.