Closed Leopixelo closed 4 months ago
Thanks for opening the issue. You're right, that's the reason for the bug. It seemed to have been introduced in 0469f9b933386a0d6b44ce0401ad083d395faef6 due to a typo. Should be fixed by 9fc86347046140fca0c4cb7c4f830a2fc2dc6acb. Feel free to reopen if you're still having issues.
Thank you for fixing this so quickly and for the awesome project. It works now.
Describe the bug The slug_length environment variable is not respected when using
UID
as slug_styleTo Reproduce Steps to reproduce the behavior:
slug_style=UID
slug_length=6
Expected behavior A short link is created with a 6 character long slug.
Which version of Chhoto-URL are you experiencing the problem on? e.g. v5.4.1
Can you reproduce the issue in the latest version? Yes
Desktop (please complete the following information):
Additional context I believe this is because of line 52 in file
actix/src/utils.rs
where the variablelen
is assigned to the environment variableslug_style
instead ofslug_length
. https://github.com/SinTan1729/chhoto-url/blob/5bbaad300102796b0b74536917fd12070d9042f2/actix/src/utils.rs#L52