Updated the category creation to include optional subcategories. First iteration of working with Go's SQL transaction setup.

This commit is contained in:
2021-09-09 15:02:05 -05:00
parent 871484a8e5
commit 42594918ef
2 changed files with 56 additions and 5 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ func insertCategoryHandler(w http.ResponseWriter, r *http.Request) {
return
}
id, ok := insertNewCategory(category.Name)
id, ok := insertNewCategory(category.Name, category.Subcategories)
if !ok {
w.WriteHeader(http.StatusInternalServerError)