aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-14 22:40:44 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-14 22:40:44 +0100
commitd78ce5309a2753693a4076697b101d2fb474822c (patch)
tree665bf809ff82acca49f25063372c50b9e7845eaf
parent9bfd7f8d516ddf59973f671397bd7b34099c784f (diff)
downloadguichet-d78ce5309a2753693a4076697b101d2fb474822c.tar.gz
guichet-d78ce5309a2753693a4076697b101d2fb474822c.zip
Remove annoying error message
-rw-r--r--guichet.hcl.example2
-rw-r--r--invite.go8
2 files changed, 4 insertions, 6 deletions
diff --git a/guichet.hcl.example b/guichet.hcl.example
index 3136956..1a1c328 100644
--- a/guichet.hcl.example
+++ b/guichet.hcl.example
@@ -12,7 +12,7 @@ job "guichet" {
task "server" {
driver = "docker"
config {
- image = "lxpz/guichet_amd64:7"
+ image = "lxpz/guichet_amd64:8"
readonly_rootfs = true
port_map {
web_port = 9991
diff --git a/invite.go b/invite.go
index 991ba2a..cb83eb4 100644
--- a/invite.go
+++ b/invite.go
@@ -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)