Started with items

This commit is contained in:
2026-06-03 14:24:14 +02:00
parent 78731c1728
commit 0a44df319d
9 changed files with 279 additions and 24 deletions

21
handlers/projects.go Normal file
View File

@@ -0,0 +1,21 @@
package handlers
import (
"MiauInv/storage"
"net/http"
)
func CreateProject(w http.ResponseWriter, r *http.Request) {
name := r.FormValue("name")
_, err := storage.DB.Exec(
"INSERT INTO projects(name) VALUES(?)",
name,
)
if err != nil {
http.Error(w, err.Error(), 500)
return
}
}