From 32e86d1129f200c776f879da835a6659427ca707 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Fri, 30 Jun 2017 23:46:11 +0100 Subject: added 'show' option --- html/index.html | 18 ++++++++++++++++++ index.html | 16 ---------------- main.go | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 html/index.html delete mode 100644 index.html diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..12c8236 --- /dev/null +++ b/html/index.html @@ -0,0 +1,18 @@ + + +

Index.html

+ +
+ Title: +
+ Paste: +
+ +
+ Show link +
+ +
+ + + diff --git a/index.html b/index.html deleted file mode 100644 index f6ec441..0000000 --- a/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - -

Index.html

- -
- Title: -
- Paste: -
- -
- -
- - - diff --git a/main.go b/main.go index aa34a5f..2ab4a81 100644 --- a/main.go +++ b/main.go @@ -101,7 +101,7 @@ func handle_put_paste(w http.ResponseWriter, r *http.Request) { // and then we return the URL: log.Printf(" `-- saving paste to : %s", paste_dir + paste_name) hostname := r.Host - if show := req_body.Get("show"); show != "" { + if show := req_body.Get("show"); show != "1" { fmt.Fprintf(w, "%s/%s", hostname, paste_name) return } else{ -- cgit v1.2.3