Correct deletion and syntax highlighing handling

This commit is contained in:
Eliot Whalan 2016-06-23 09:58:28 +10:00
parent c927198df3
commit 9ff488d999
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
1 changed files with 2 additions and 2 deletions

View File

@ -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)