Files
MiauInv/handlers/projects.go
2026-06-03 14:24:14 +02:00

22 lines
300 B
Go

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
}
}