Peter Mutwiri commited on
Commit
6863a84
·
1 Parent(s): 19a28b8

corrected schema.py

Browse files
Files changed (1) hide show
  1. app/routers/schema.py +3 -1
app/routers/schema.py CHANGED
@@ -12,8 +12,10 @@ async def discover_schema(org_id: str = Depends(get_current_user)["org_id"]):
12
  @router.post("/override")
13
  async def override_schema(
14
  mapping: Dict[str, str],
15
- org_id: str = Depends(get_current_user)["org_id"]
16
  ):
 
 
17
  """Allow manual column mapping override"""
18
  schema = OrgSchema(org_id)
19
  schema.save_mapping(mapping)
 
12
  @router.post("/override")
13
  async def override_schema(
14
  mapping: Dict[str, str],
15
+ current_user: dict = Depends(get_current_user) # ✅ Get full dict first
16
  ):
17
+ org_id = current_user["org_id"] # Then extract inside function
18
+
19
  """Allow manual column mapping override"""
20
  schema = OrgSchema(org_id)
21
  schema.save_mapping(mapping)