1
0

In Article HTTP handler a loging for web.GetArticle() was changed.

This commit is contained in:
Alexander Andreev 2023-09-24 20:00:49 +04:00
parent 48e7a86312
commit fe87114fe0
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -103,9 +103,9 @@ func (h *Handlers) About(w http.ResponseWriter, r *http.Request) {
func (h *Handlers) Article(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:] name := r.URL.Path[strings.LastIndex(r.URL.Path, "/")+1:]
artcl, err := web.GetArticle(name) artcl := web.GetArticle(name)
if err != nil { if artcl == nil {
http.Error(w, err.Error(), http.StatusNotFound) http.Error(w, "an article doesn't exist", http.StatusNotFound)
return return
} }