Files
OSIT-AE-API-FastAPI/app/routers/aether_cfg.py
Scott Idem 8eb699efe5 refactor(routers): comment out legacy endpoints across multiple routers
Disabled legacy routes that are superseded by V3 equivalents. Code is
commented out (not deleted) pending final verification and cleanup pass.

- registry.py: remove sql, lookup (/lu), websockets, websockets_redis;
  clean up dead imports (contact, event_person, etc.)
- data_store.py: comment out legacy CRUD and code-lookup endpoints;
  keep V3 code-lookup routes active; add TODO for action path rename
- api.py: comment out Api_Base CRUD, get_id (internal ID leak),
  and sql_test (debug) endpoints
- aether_cfg.py: comment out legacy Flask cfg endpoint
- user.py: comment out legacy user endpoints
- util_email.py: minor cleanup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 19:22:45 -04:00

63 lines
2.6 KiB
Python

import datetime
#from datetime import datetime, time, timedelta
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
from pydantic import BaseModel, EmailStr, Field
from typing import Dict, List, Optional, Set, Union
from app.lib_general import log, logging, common_route_params, Common_Route_Params, common_route_params_no_account_id, Common_Route_Params_No_Account_ID
from app.config import settings
from app.db_sql import sql_enable_part, sql_insert, sql_update, sql_insert_or_update, sql_limit_offset_part, sql_select, sql_delete, redis_lookup_id_random
# from app.models.aether_cfg_models import Aether_Cfg_Base
from app.models.response_models import Resp_Body_Base, mk_resp
router = APIRouter()
@router.get('/aether/cfg/{aether_cfg_id}', response_model=Resp_Body_Base)
async def get_aether_cfg_obj(
aether_cfg_id: int,
# aether_cfg_id: str = Path(min_length=11, max_length=22),
# commons: Common_Route_Params = Depends(common_route_params),
commons: Common_Route_Params_No_Account_ID = Depends(common_route_params_no_account_id),
# x_account_id: str = Header(None, min_length=11, max_length=22),
# response: Response = Response,
):
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
if sql_select_result := sql_select(
table_name = 'cfg',
record_id = aether_cfg_id,
as_list = False,
max_count = 1,
):
return mk_resp(data=sql_select_result, response=commons.response)
else:
return mk_resp(data=None, status_code=404, response=commons.response)
# @router.get('/aether/flask/cfg/{aether_flask_cfg_id}', response_model=Resp_Body_Base)
# async def get_aether_flask_cfg_obj(
# aether_flask_cfg_id: int,
# # aether_flask_cfg_id: str = Path(min_length=11, max_length=22),
# # NOTE: The x_account_id header value is not required.
# # commons: Common_Route_Params = Depends(common_route_params),
# commons: Common_Route_Params_No_Account_ID = Depends(common_route_params_no_account_id),
# ):
# log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
# log.debug(locals())
# if sql_select_result := sql_select(
# table_name = 'cfg_flask',
# record_id = aether_flask_cfg_id,
# as_list = False,
# max_count = 1,
# ):
# return mk_resp(data=sql_select_result, response=commons.response)
# else:
# return mk_resp(data=None, status_code=404, response=commons.response)