From 9ff488d999da438c21a6f78f508fbcbf52aa7968 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Thu, 23 Jun 2016 09:58:28 +1000 Subject: [PATCH] Correct deletion and syntax highlighing handling --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index cfeb168..2541900 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,7 @@ import ( const ( ADDRESS = "http://localhost:9900" LENGTH = 6 - DELETE = ADDRESS + "/{PASTE}/{DELKEY}\n" + DELETE = ADDRESS + "/del/{PASTE}/{DELKEY}\n" PASTEARGS = ADDRESS + "/p/{PASTE}/(python|language)\n" URLARGS = ADDRESS + "/save/XML|JSON\n" SOURCE = "Source: https://github.com/ewhal/Pastebin\n" @@ -221,7 +221,7 @@ func main() { router := mux.NewRouter().StrictSlash(true) router.HandleFunc("/", rootHandler) router.HandleFunc("/p/{pasteId}", pasteHandler) - router.HandleFunc("/p/{pasteId}.{lang}", langHandler) + router.HandleFunc("/p/{pasteId}/{lang}", langHandler) router.HandleFunc("/save", saveHandler) router.HandleFunc("/save/{output}", saveHandler) router.HandleFunc("/del/{pasteId}/{delKey}", delHandler)