From f1e770b78a5d0ecb3a332ed510a9385eaa3c8052 Mon Sep 17 00:00:00 2001 From: David Vaini Date: Mon, 29 Apr 2019 11:06:43 -0500 Subject: [PATCH] added business logic to add not a customer into registration process --- controllers/customer/user.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controllers/customer/user.go b/controllers/customer/user.go index fecb522b..d8ff61b2 100644 --- a/controllers/customer/user.go +++ b/controllers/customer/user.go @@ -246,6 +246,11 @@ func RegisterUser(rw http.ResponseWriter, r *http.Request, enc encoding.Encoder) user.NotCustomer, _ = strconv.ParseBool(r.FormValue("notCustomer")) user.Current = user.NotCustomer user.Active = true // forcing active status + // If CustomerID is blank and CustID is blank, then the user gets lumped into this customer: (Not a Customer) + if user.CustomerID == 0 && user.CustID == 0{ + user.CustomerID = 333333 + user.CustID = 10443699 + } genPass := r.FormValue("generatePass") pass := r.FormValue("pass")