forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

appview: strings: return 404 page if string wasnt found

Signed-off-by: dusk <y.bera003.06@protonmail.com>

Changed files
+5
appview
strings
+5
appview/strings/strings.go
···
w.WriteHeader(http.StatusInternalServerError)
return
}
+
if len(strings) < 1 {
+
l.Error("string not found")
+
s.Pages.Error404(w)
+
return
+
}
if len(strings) != 1 {
l.Error("incorrect number of records returned", "len(strings)", len(strings))
w.WriteHeader(http.StatusInternalServerError)