mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
18 lines
474 B
Python
18 lines
474 B
Python
from fastapi import HTTPException
|
|
from config.config import get_learnhouse_config
|
|
|
|
|
|
def isDevModeEnabled():
|
|
config = get_learnhouse_config()
|
|
if config.general_config.development_mode:
|
|
return True
|
|
else:
|
|
return False
|
|
|
|
|
|
def isDevModeEnabledOrRaise():
|
|
config = get_learnhouse_config()
|
|
if config.general_config.development_mode:
|
|
return True
|
|
else:
|
|
raise HTTPException(status_code=403, detail="Development mode is disabled")
|