From 2cc85379cc09a20eaed1403b78f39ba21041989d Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Fri, 6 Sep 2024 11:02:33 +0300 Subject: [PATCH] update log --- internal/handlers/ussd/menuhandler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index 6217921..3482f2a 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -172,7 +172,7 @@ func (h *Handlers) CreateAccount(ctx context.Context, sym string, input []byte) _, err = utils.ReadEntry(ctx, h.userdataStore, sessionId, utils.DATA_ACCOUNT_CREATED) if err != nil { if db.IsNotFound(err) { - fmt.Println("Creating an account because it doesn't exist") + logg.Printf(logging.LVL_INFO, "Creating an account because it doesn't exist") err = h.createAccountNoExist(ctx, sessionId, &res) if err != nil { return res, err @@ -315,6 +315,8 @@ func (h *Handlers) SaveFamilyname(ctx context.Context, sym string, input []byte) if err != nil { return res, nil } + } else { + return res,fmt.Errorf("a family name cannot be less than one character") } return res, nil