mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: more various bug and issues
This commit is contained in:
parent
86e7ecc0fc
commit
c3a5f43f13
20 changed files with 349 additions and 251 deletions
14
src/services/dev/dev.py
Normal file
14
src/services/dev/dev.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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:
|
||||
raise HTTPException(
|
||||
status_code=403,
|
||||
detail="Development mode is not enabled",
|
||||
)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue