Change URL
This commit is contained in:
parent
52e38adcb7
commit
cd74846a7f
2
api.py
2
api.py
@ -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")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user