From ec2e885438e3ee87f7a9a85db9fbf1ed7fd8021b Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Wed, 2 May 2018 11:29:29 +0500 Subject: [PATCH] README update about current functionality and public pastes saving fix. --- README.md | 3 +-- pastes/api_http.go | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b245820..b434cae 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,7 @@ whistles, no websockets and even NO JAVASCRIPT!(*) # Current functionality. -* Paste text. -* View pastes. +* Create and view public and private pastes. * Syntax highlighting. # Caveats. diff --git a/pastes/api_http.go b/pastes/api_http.go index 86df749..99ad23d 100644 --- a/pastes/api_http.go +++ b/pastes/api_http.go @@ -220,7 +220,8 @@ func pastePOST(ec echo.Context) error { // Private paste? paste.Private = false - if params["paste-private"][0] == "on" { + privateCheckbox, privateCheckboxFound := params["paste-private"] + if privateCheckboxFound && privateCheckbox[0] == "on" { paste.Private = true }