SinTan1729 / chhoto-url

A simple, blazingly fast, selfhosted URL shortener with no unnecessary features; written in Rust.
https://hub.docker.com/r/sintan1729/chhoto-url
MIT License
142 stars 15 forks source link

API endpoint to edit the link #19

Closed pythoninja closed 6 months ago

pythoninja commented 6 months ago

Is your feature request related to a problem? Please describe. This is not an issue at all, but it will be good to just curl to edit the link. My current use-case: I want to redirect with a permanent slug, say "current-preset" to the URL on S3 (which could be changed when I update the final file).

Describe the solution you'd like curl -X PUT -d '{"longlink": "https://newlink.com/file.json}' chhoto-url:4567/api/edit/<shortlink>

Or something like that.

Describe alternatives you've considered It's still possible to manually edit rows in the database.

SinTan1729 commented 6 months ago

You can always just delete and recreate the link. This shouldn't be any different functionally, except for retaining the hit count.

pythoninja commented 6 months ago

Ok, thank you for your reply.