szabodanika / microbin

A secure, configurable file-sharing and URL shortening web app written in Rust.
https://microbin.eu
BSD 3-Clause "New" or "Revised" License
2.66k stars 167 forks source link

Add custom url support #252

Closed OXeu closed 7 months ago

OXeu commented 7 months ago

Support #83

What changed

Why replace pasta.id == id

There are a large number of statements in the code that compare pasta.id == id, and implementing custom url inevitably introduces additional fields, requiring a large number of duplicate judgments to be written at all positions. Therefore, I choose to extract the comparison logic into a lambda function to reduce duplicate code.

Other

Todo