ccbikai / Sink

⚡ A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.
https://sink.cool
GNU Affero General Public License v3.0
2.37k stars 1.05k forks source link

4 digits slug via API? #26

Open Root-FTW opened 1 month ago

Root-FTW commented 1 month ago

I have been using this project with my domain and it works perfect, it allows me to create shortened links and it's great, just one question, in cloudflare configure the slug to be 4 digits maximum, when using it via UI it works and generates the 4 digits slug, but via API is not like that, is there a way to specify via API that I want the slug to be 4 digits?

ccbikai commented 1 month ago

You can directly pass a 4-digit slug when calling the API, and if it is duplicated, the creation will fail.