whs-authz-authn/oauth-backend
Watch
1
0
Fork
You've already forked oauth-backend
0
mirror of https://github.com/j93es/oauth-backend.git synced 2026-10-12 07:21:20 +09:00

러스트가 좋아서 데이트하러감

This commit is contained in:
imnyang 2025-06-07 19:15:06 +09:00
commit fcc0b6d2f3

View file

@ -0,0 +1,23 @@
from fastapi import FastAPI, Query, HTTPException
from fastapi.responses import Response
import lib.target as target
app = FastAPI()
@app.post("/start")
async def start(url: str = Query(None)):
if url:
target.save(url)
print(f"Target URL set to: {url}")
return {"message": f"Target URL set to: {url}"}
return {"error": "No URL provided"}
@app.exception_handler(404)
async def not_found_handler(request, exc):
return Response(status_code=404)
@app.exception_handler(405)
async def method_not_allowed_handler(request, exc):
return Response(status_code=405)