show an error to user for honk to nowhere

This commit is contained in:
Ted Unangst 2019-06-25 19:17:39 -04:00
parent bff61bd24c
commit 265ca7128a
1 changed files with 1 additions and 0 deletions

View File

@ -956,6 +956,7 @@ func savehonk(w http.ResponseWriter, r *http.Request) {
honk.Audience = oneofakind(honk.Audience)
if len(honk.Audience) == 0 {
log.Printf("honk to nowhere")
http.Error(w, "honk to nowhere...", http.StatusNotFound)
return
}
honk.Public = !keepitquiet(honk.Audience)