Peter Mutwiri commited on
Commit ·
d934649
1
Parent(s): 4e84527
refactored veryfy api jey
Browse files
app/routers/datasources.py
CHANGED
|
@@ -2,7 +2,7 @@ from fastapi import APIRouter, Query, Form, File, UploadFile, Depends, HTTPExcep
|
|
| 2 |
from fastapi.responses import JSONResponse
|
| 3 |
from pydantic import BaseModel
|
| 4 |
from typing import List, Any, Dict, Union
|
| 5 |
-
from app.deps import
|
| 6 |
from app.db import get_conn, ensure_raw_table, bootstrap
|
| 7 |
from app.mapper import canonify_df
|
| 8 |
from app.utils.detect_industry import detect_industry
|
|
@@ -24,7 +24,7 @@ async def create_source(
|
|
| 24 |
config: str = Form(...),
|
| 25 |
file: UploadFile = File(None),
|
| 26 |
data: str = Form(None),
|
| 27 |
-
_: str = Depends(
|
| 28 |
):
|
| 29 |
"""
|
| 30 |
Keeps existing behavior – for CSV upload, POS plug-in, API push, etc.
|
|
|
|
| 2 |
from fastapi.responses import JSONResponse
|
| 3 |
from pydantic import BaseModel
|
| 4 |
from typing import List, Any, Dict, Union
|
| 5 |
+
from app.deps import verify_api_key
|
| 6 |
from app.db import get_conn, ensure_raw_table, bootstrap
|
| 7 |
from app.mapper import canonify_df
|
| 8 |
from app.utils.detect_industry import detect_industry
|
|
|
|
| 24 |
config: str = Form(...),
|
| 25 |
file: UploadFile = File(None),
|
| 26 |
data: str = Form(None),
|
| 27 |
+
_: str = Depends(verify_api_key),
|
| 28 |
):
|
| 29 |
"""
|
| 30 |
Keeps existing behavior – for CSV upload, POS plug-in, API push, etc.
|