MarioPrzBasto commited on
Commit
14b8c90
·
verified ·
1 Parent(s): 45b771c

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -4
main.py CHANGED
@@ -1,5 +1,5 @@
1
  from typing import List
2
- from fastapi import FastAPI, HTTPException, Request
3
  from fastapi.responses import JSONResponse
4
  import os
5
  import json
@@ -45,9 +45,7 @@ app = FastAPI()
45
  BASE_DIR = "/tmp/data"
46
 
47
  @app.post("/save")
48
- async def save(image_data: RequestModel, request: Request):
49
- body = await request.body()
50
- print("RAW BODY RECEIVED →", body.decode())
51
  os.makedirs(BASE_DIR, exist_ok=True)
52
  filename = os.path.join(BASE_DIR, f"{image_data.originId}_{image_data.assetCode}.json")
53
 
 
1
  from typing import List
2
+ from fastapi import FastAPI, HTTPException
3
  from fastapi.responses import JSONResponse
4
  import os
5
  import json
 
45
  BASE_DIR = "/tmp/data"
46
 
47
  @app.post("/save")
48
+ async def save(image_data: RequestModel):
 
 
49
  os.makedirs(BASE_DIR, exist_ok=True)
50
  filename = os.path.join(BASE_DIR, f"{image_data.originId}_{image_data.assetCode}.json")
51