summaryrefslogtreecommitdiff
path: root/view/recipe.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-04-23 17:42:57 +0200
committerxengineering <me@xengineering.eu>2024-05-09 12:19:30 +0200
commit2704cb76554b02f546bf3f9d2d11be98f2854b7b (patch)
treecd167fcc3a0c27ee2943c2d7abd3acc8741406f6 /view/recipe.go
parentc5e7551dc2da9798ff51d91aa238098f5ac4605f (diff)
downloadceres-2704cb76554b02f546bf3f9d2d11be98f2854b7b.tar
ceres-2704cb76554b02f546bf3f9d2d11be98f2854b7b.tar.zst
ceres-2704cb76554b02f546bf3f9d2d11be98f2854b7b.zip
Remove default recipe name
To avoid not clickable recipes on the /recipes page a default name used to be inserted on recipe creation. This was not a proper fix for the problem and also was annoying that the user first had to remove the default recipe name. This commit removes this default name.
Diffstat (limited to 'view/recipe.go')
-rw-r--r--view/recipe.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/view/recipe.go b/view/recipe.go
index 7b9980d..8236476 100644
--- a/view/recipe.go
+++ b/view/recipe.go
@@ -51,3 +51,13 @@ func RecipeRead(w http.ResponseWriter, r *http.Request) {
return
}
}
+
+func RecipeCreate(w http.ResponseWriter, r *http.Request) {
+ recipe := model.Recipe{}
+
+ err := html.ExecuteTemplate(w, "recipe-edit", recipe)
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusInternalServerError)
+ return
+ }
+}