Change URL

This commit is contained in:
Joseph Ferano 2023-05-19 17:16:43 +07:00
parent 52e38adcb7
commit cd74846a7f

2
api.py
View File

@ -48,7 +48,7 @@ async def create_url(body: dict):
# TODO: Calculate how many unique IDs we are actually generating
url_id = uuid.uuid4().hex[:6]
db[url_id] = { "full_url": body["url"], "user_id": body["username"] }
return { "shortenedUrl": "http://localhost:8000/" + url_id }
return { "shortenedUrl": "https://zipmy.link/" + url_id }
else:
raise HTTPException(status_code=400, detail="Url provided is invalid")