zer0bin-dev / zer0bin

🖊️ // Just a place to paste
https://zer0b.in
MIT License
93 stars 8 forks source link

:sparkles: Download paste endpoint #53

Closed nullobsi closed 4 months ago

nullobsi commented 2 years ago

i haven't written rust before but this seemed easy. it still needs tests :) /p/d/:id

ThatOneCalculator commented 2 years ago

Looks good! Requesting review from @Domterion

ThatOneCalculator commented 2 years ago

@nullobsi actually, feature request on this PR: make it download as a .md file if it matches the markdown rules

nullobsi commented 2 years ago

make it download as a .md file if it matches the markdown rules

I'm not sure what the markdown rules are. Would the backend have to implement a Markdown parser?

-- Kayden Tebau @.***> https://nullob.si/ 🐺 woof

ThatOneCalculator commented 2 years ago

I'm not sure what the markdown rules are. Would the backend have to implement a Markdown parser?

Nope. It's in the readme, but if a paste starts with ---, md or md\n it's a markdown paste.

nullobsi commented 2 years ago

Should I make another PR for the download button?

ThatOneCalculator commented 2 years ago

Id wait for #54 to be merged, fetch upstream, then add the icon to this pr.

nullobsi commented 2 years ago

alright sounds good :)

ThatOneCalculator commented 2 years ago

@nullobsi :D

nullobsi commented 2 years ago

I think it's ready, but it needs some testing that I do not have time to do right now

mellowmarshe commented 2 years ago

Code looks good! My approval will be had once tested! 🚀