In Article HTTP handler a loging for web.GetArticle() was changed.
This commit is contained in:
parent
48e7a86312
commit
fe87114fe0
@ -103,9 +103,9 @@ func (h *Handlers) About(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (h *Handlers) Article(w http.ResponseWriter, r *http.Request) {
|
||||
name := r.URL.Path[strings.LastIndex(r.URL.Path, "/")+1:]
|
||||
artcl, err := web.GetArticle(name)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusNotFound)
|
||||
artcl := web.GetArticle(name)
|
||||
if artcl == nil {
|
||||
http.Error(w, "an article doesn't exist", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user