Remove annoying error message

This commit is contained in:
Alex 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,13 +223,11 @@ 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"], "")
trySendCode(login, choice, sendto, data) if choice == "display" || choice == "send" {
trySendCode(login, choice, sendto, data)
}
} }
templateInviteSendCode.Execute(w, data) templateInviteSendCode.Execute(w, data)