Compare commits

...

2 Commits

Author SHA1 Message Date
Niko Abeler ecc12333e1 show error in h value 2022-11-19 15:55:38 +01:00
Niko Abeler 33ca1fba6f set date 2022-11-19 15:54:26 +01:00
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import (
"os"
"path"
"strings"
"time"
"github.com/julienschmidt/httprouter"
)
@ -288,7 +289,7 @@ func userMicropubHandler(repo *owl.Repository) func(http.ResponseWriter, *http.R
if h != "entry" {
w.WriteHeader(http.StatusBadRequest)
w.Write([]byte("Bad request. h must be entry"))
w.Write([]byte("Bad request. h must be entry. Got " + h))
return
}
if content == "" {
@ -304,6 +305,7 @@ func userMicropubHandler(repo *owl.Repository) func(http.ResponseWriter, *http.R
Reply: owl.Reply{
Url: inReplyTo,
},
Date: time.Now(),
},
content,
)