nidus-sync/rmo/form.go
Eli Ribble a9b0a55f20
Create report platform layer
Rework phone subscription at the database layer so that we have a
seprate phone status and subscriptions to district communications.
2026-01-31 20:08:08 +00:00

26 lines
364 B
Go

package rmo
import (
"net/http"
)
func postFormBool(r *http.Request, k string) *bool {
v := r.PostFormValue(k)
if v == "" {
return nil
}
result := false
if v == "on" {
result = true
return &result
}
return &result
}
func postFormValueOrNone(r *http.Request, k string) string {
v := r.PostFormValue(k)
if v == "" {
return "none"
}
return v
}