|
@@ -28,10 +28,7 @@ from apps.web.models.tags import (
|
|
|
|
|
|
from constants import ERROR_MESSAGES
|
|
from constants import ERROR_MESSAGES
|
|
|
|
|
|
-from config import (
|
|
|
|
- SRC_LOG_LEVELS,
|
|
|
|
- ALLOW_ADMIN_EXPORT
|
|
|
|
-)
|
|
|
|
|
|
+from config import SRC_LOG_LEVELS, ENABLE_ADMIN_EXPORT
|
|
|
|
|
|
log = logging.getLogger(__name__)
|
|
log = logging.getLogger(__name__)
|
|
log.setLevel(SRC_LOG_LEVELS["MODELS"])
|
|
log.setLevel(SRC_LOG_LEVELS["MODELS"])
|
|
@@ -82,7 +79,7 @@ async def get_all_user_chats(user=Depends(get_current_user)):
|
|
|
|
|
|
@router.get("/all/db", response_model=List[ChatResponse])
|
|
@router.get("/all/db", response_model=List[ChatResponse])
|
|
async def get_all_user_chats_in_db(user=Depends(get_admin_user)):
|
|
async def get_all_user_chats_in_db(user=Depends(get_admin_user)):
|
|
- if not ALLOW_ADMIN_EXPORT:
|
|
|
|
|
|
+ if not ENABLE_ADMIN_EXPORT:
|
|
raise HTTPException(
|
|
raise HTTPException(
|
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
|
detail=ERROR_MESSAGES.ACCESS_PROHIBITED,
|
|
detail=ERROR_MESSAGES.ACCESS_PROHIBITED,
|