Remove annoying error message

This commit is contained in:
Alex Auvolat 2020-02-14 22:40:44 +01:00
parent 9bfd7f8d51
commit d78ce5309a
2 changed files with 4 additions and 6 deletions

View File

@ -12,7 +12,7 @@ job "guichet" {
task "server" { task "server" {
driver = "docker" driver = "docker"
config { config {
image = "lxpz/guichet_amd64:7" image = "lxpz/guichet_amd64:8"
readonly_rootfs = true readonly_rootfs = true
port_map { port_map {
web_port = 9991 web_port = 9991

View File

@ -223,14 +223,12 @@ func handleInviteSendCode(w http.ResponseWriter, r *http.Request) {
r.ParseForm() r.ParseForm()
choice := strings.Join(r.Form["choice"], "") 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"], "") sendto := strings.Join(r.Form["sendto"], "")
if choice == "display" || choice == "send" {
trySendCode(login, choice, sendto, data) trySendCode(login, choice, sendto, data)
} }
}
templateInviteSendCode.Execute(w, data) templateInviteSendCode.Execute(w, data)
} }