From 5e2513eb1f4e15deabcc37761dc4b5c47d9077e1 Mon Sep 17 00:00:00 2001 From: Daniel Szabo Date: Mon, 7 Nov 2022 00:27:25 +0200 Subject: [PATCH] Fix empty pasta content showing code field content has to be "No Text Content" to hide the code field on the pasta view --- src/endpoints/create.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/endpoints/create.rs b/src/endpoints/create.rs index 2a88f23..be8250d 100644 --- a/src/endpoints/create.rs +++ b/src/endpoints/create.rs @@ -127,7 +127,9 @@ pub async fn create( String::from("text") }; } - new_pasta.content = content; + if content.len() > 0 { + new_pasta.content = content; + } continue; } "syntax-highlight" => {