[Refactor] 리팩터링

This commit is contained in:
tv0924@icloud.com 2025-06-26 10:43:52 +09:00
commit 062552d3d8
12 changed files with 24 additions and 22 deletions

View file

@ -1,6 +1,6 @@
from fastapi import FastAPI, Query, HTTPException
from fastapi.responses import Response
import lib.target as target
import lib.cur_target_url as cur_target_url
app = FastAPI()
@ -8,7 +8,7 @@ app = FastAPI()
@app.post("/start")
async def start(url: str = Query(None)):
if url:
target.save(url)
cur_target_url.save(url)
print(f"Target URL set to: {url}")
return {"message": f"Target URL set to: {url}"}
return {"error": "No URL provided"}