Closed GuyKh closed 1 year ago
@mbos2 - I can't test it, but I think it's done
Hey @GuyKh
I see you're adding shortUrlFull to the query and then parsing it to get the code in the backend. There's no need to do that.
You can send shortUrl
from the frontend, because it's present in the data. shortUrl is only the code.
Here's how it's in the database
Could you make those small adjustments so you use shortUrl instead shortUrlFull and then extracting the code from that?
This is the data object example for every item you get when generating table in the UI
{
"shortUrl": "lt3kil",
"url": "https://quangpro1610.github.io/w3school-october-event-halloween-responsive-website",
"shortUrlFull": "https://6515fbdc6a7b8aa04c45.appwrite.global/lt3kil",
"createdAt": 1696163434886,
"alias": "asdas",
"$databaseId": "short_url_database",
"$collectionId": "short_url_collection"
}
So here it would be item.shortUrl that you should add for the delete functionaliy
@mbos2 done, in the backend I still would keep the "clearing" of the domain because of decoupling both; As the API theoretically can support both
@GuyKh This will probably have to be changed cause it causes some frontend hickup I believe, but no worries about it, I'll make a change on it.
Thanks for the contribution :)
Solves #3