mirror of
https://github.com/j93es/oauth-backend.git
synced 2026-06-04 06:51:51 +09:00
[Refactor] 리팩터링
This commit is contained in:
parent
afcfd7de87
commit
062552d3d8
12 changed files with 24 additions and 22 deletions
|
|
@ -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"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue