diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-14 22:40:44 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-14 22:40:44 +0100 |
commit | d78ce5309a2753693a4076697b101d2fb474822c (patch) | |
tree | 665bf809ff82acca49f25063372c50b9e7845eaf /invite.go | |
parent | 9bfd7f8d516ddf59973f671397bd7b34099c784f (diff) | |
download | guichet-d78ce5309a2753693a4076697b101d2fb474822c.tar.gz guichet-d78ce5309a2753693a4076697b101d2fb474822c.zip |
Remove annoying error message
Diffstat (limited to 'invite.go')
-rw-r--r-- | invite.go | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -223,13 +223,11 @@ func handleInviteSendCode(w http.ResponseWriter, r *http.Request) { r.ParseForm() choice := strings.Join(r.Form["choice"], "") - if choice != "display" && choice != "send" { - http.Error(w, "Invalid entry", http.StatusBadRequest) - return - } sendto := strings.Join(r.Form["sendto"], "") - trySendCode(login, choice, sendto, data) + if choice == "display" || choice == "send" { + trySendCode(login, choice, sendto, data) + } } templateInviteSendCode.Execute(w, data) |