- new license

- name of project is now provided when logging in
This commit is contained in:
2026-02-27 17:46:12 +01:00
parent 383d852545
commit f4501d0c04
6 changed files with 134 additions and 29 deletions

View File

@@ -6,12 +6,15 @@ import (
"net/http"
"os"
"shap-planner-backend/auth"
"shap-planner-backend/config"
"shap-planner-backend/models"
"shap-planner-backend/storage"
"shap-planner-backend/utils"
"time"
)
var cfg, _ = config.LoadConfig()
func Register(w http.ResponseWriter, r *http.Request) {
var user models.User
if err := json.NewDecoder(r.Body).Decode(&user); err != nil {
@@ -108,6 +111,7 @@ func Login(w http.ResponseWriter, r *http.Request) {
"username": user.Username,
"role": user.Role,
},
"wgName": cfg.HouseholdName,
}
w.Header().Set("Content-Type", "application/json")