diff pkg/controllers/stretches.go @ 5204:7ca9e6c9a203 new-fwa

Introduced type for mode (monthly, quarterly, yearly).
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 11 May 2020 11:03:19 +0200
parents 4847ac70103a
children 23addd19a6e2
line wrap: on
line diff
--- a/pkg/controllers/stretches.go	Fri May 08 18:59:14 2020 +0200
+++ b/pkg/controllers/stretches.go	Mon May 11 11:03:19 2020 +0200
@@ -209,7 +209,7 @@
 	vars := mux.Vars(req)
 	stretch := vars["kind"] == "stretch"
 	name := vars["name"]
-	mode := intervalMode(req.FormValue("mode"))
+	mode := parseFWAMode(req.FormValue("mode"))
 
 	depthbreaks, widthbreaks := afdRefs, afdRefs
 
@@ -460,7 +460,7 @@
 	vars := mux.Vars(req)
 	stretch := vars["kind"] == "stretch"
 	name := vars["name"]
-	mode := intervalMode(req.FormValue("mode"))
+	mode := parseFWAMode(req.FormValue("mode"))
 
 	if name == "" {
 		http.Error(