From 5c85ecffd1b7ffa10649ea86646421be6ad0c503 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 24 Sep 2024 09:00:13 +0300 Subject: [PATCH 01/12] remove unused code --- internal/handlers/handlerservice.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/handlers/handlerservice.go b/internal/handlers/handlerservice.go index 93c5a10..ad591bf 100644 --- a/internal/handlers/handlerservice.go +++ b/internal/handlers/handlerservice.go @@ -88,7 +88,6 @@ func (localHandlerService *LocalHandlerService) GetHandler() (*ussd.Handlers, er localHandlerService.DbRs.AddLocalFunc("get_profile_info", ussdHandlers.GetProfileInfo) localHandlerService.DbRs.AddLocalFunc("verify_yob", ussdHandlers.VerifyYob) localHandlerService.DbRs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob) - localHandlerService.DbRs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit) localHandlerService.DbRs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction) localHandlerService.DbRs.AddLocalFunc("save_temporary_pin", ussdHandlers.SaveTemporaryPin) localHandlerService.DbRs.AddLocalFunc("verify_new_pin", ussdHandlers.VerifyNewPin) From eff2cbde8b864ddbd7c69231ecfb200118ee11ed Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 24 Sep 2024 09:00:31 +0300 Subject: [PATCH 02/12] setup check for unused code --- internal/utils/isocode.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 internal/utils/isocode.go diff --git a/internal/utils/isocode.go b/internal/utils/isocode.go new file mode 100644 index 0000000..34365b0 --- /dev/null +++ b/internal/utils/isocode.go @@ -0,0 +1,15 @@ +package utils + + + + +var isoCodes = map[string]bool{ + "eng": true, // English + "swa": true, // Swahili + +} + +func IsValidISO639(code string) bool { + return isoCodes[code] +} + From bbfe46f162e64aa22f1caf78f3bbd75c16107881 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 24 Sep 2024 09:01:19 +0300 Subject: [PATCH 03/12] use current rendering symbol for case selection --- internal/handlers/ussd/menuhandler.go | 62 ++++++--------------------- 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index ff8d8bd..8ffecc3 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -117,17 +117,14 @@ func (h *Handlers) Init(ctx context.Context, sym string, input []byte) (resource func (h *Handlers) SetLanguage(ctx context.Context, sym string, input []byte) (resource.Result, error) { var res resource.Result - sym, _ = h.st.Where() + symbol, _ := h.st.Where() + code := strings.Split(symbol, "_")[1] - switch sym { - case "set_default": - res.FlagSet = append(res.FlagSet, state.FLAG_LANG) - res.Content = "eng" - case "set_swa": - res.FlagSet = append(res.FlagSet, state.FLAG_LANG) - res.Content = "swa" - default: + if !utils.IsValidISO639(code) { + return res, nil } + res.FlagSet = append(res.FlagSet, state.FLAG_LANG) + res.Content = code languageSetFlag, err := h.flagManager.GetFlag("flag_language_set") if err != nil { @@ -279,32 +276,6 @@ func (h *Handlers) ConfirmPinChange(ctx context.Context, sym string, input []byt return res, nil } -// SetResetSingleEdit sets and resets flags to allow gradual editing of profile information. -func (h *Handlers) SetResetSingleEdit(ctx context.Context, sym string, input []byte) (resource.Result, error) { - var res resource.Result - - menuOption := string(input) - - flag_allow_update, _ := h.flagManager.GetFlag("flag_allow_update") - flag_single_edit, _ := h.flagManager.GetFlag("flag_single_edit") - - switch menuOption { - case "2": - res.FlagReset = append(res.FlagReset, flag_allow_update) - res.FlagSet = append(res.FlagSet, flag_single_edit) - case "3": - res.FlagReset = append(res.FlagReset, flag_allow_update) - res.FlagSet = append(res.FlagSet, flag_single_edit) - case "4": - res.FlagReset = append(res.FlagReset, flag_allow_update) - res.FlagSet = append(res.FlagSet, flag_single_edit) - default: - res.FlagReset = append(res.FlagReset, flag_single_edit) - } - - return res, nil -} - // VerifyPin checks whether the confirmation PIN is similar to the account PIN // If similar, it sets the USERFLAG_PIN_SET flag allowing the user // to access the main menu @@ -435,6 +406,7 @@ func (h *Handlers) SaveLocation(ctx context.Context, sym string, input []byte) ( // SaveGender updates the gender in the gdbm with the provided input. func (h *Handlers) SaveGender(ctx context.Context, sym string, input []byte) (resource.Result, error) { + symbol, _ := h.st.Where() var res resource.Result var err error sessionId, ok := ctx.Value("SessionId").(string) @@ -442,21 +414,11 @@ func (h *Handlers) SaveGender(ctx context.Context, sym string, input []byte) (re return res, fmt.Errorf("missing session") } - if len(input) > 0 { - gender := string(input) - switch gender { - case "1": - gender = "Male" - case "2": - gender = "Female" - case "3": - gender = "Unspecified" - } - store := h.userdataStore - err = store.WriteEntry(ctx, sessionId, utils.DATA_GENDER, []byte(gender)) - if err != nil { - return res, nil - } + gender := strings.Split(symbol, "_")[1] + store := h.userdataStore + err = store.WriteEntry(ctx, sessionId, utils.DATA_GENDER, []byte(gender)) + if err != nil { + return res, nil } return res, nil From 1bd96d0689f442110f46e43604e58b8838f19390 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 24 Sep 2024 09:02:04 +0300 Subject: [PATCH 04/12] setup dedicated nodes for case selection --- services/registration/edit_profile.vis | 2 -- services/registration/select_gender.vis | 8 +++++--- services/registration/select_language.vis | 2 +- services/registration/{set_default.vis => set_eng.vis} | 0 services/registration/set_female.vis | 4 ++++ services/registration/set_male.vis | 4 ++++ services/registration/set_unspecified.vis | 4 ++++ 7 files changed, 18 insertions(+), 6 deletions(-) rename services/registration/{set_default.vis => set_eng.vis} (100%) create mode 100644 services/registration/set_female.vis create mode 100644 services/registration/set_male.vis create mode 100644 services/registration/set_unspecified.vis diff --git a/services/registration/edit_profile.vis b/services/registration/edit_profile.vis index 6c1986f..9d45ec9 100644 --- a/services/registration/edit_profile.vis +++ b/services/registration/edit_profile.vis @@ -11,8 +11,6 @@ MOUT view 7 MOUT back 0 HALT INCMP my_account 0 -LOAD set_reset_single_edit 0 -RELOAD set_reset_single_edit INCMP enter_name 1 INCMP enter_familyname 2 INCMP select_gender 3 diff --git a/services/registration/select_gender.vis b/services/registration/select_gender.vis index 25e53d3..1082cef 100644 --- a/services/registration/select_gender.vis +++ b/services/registration/select_gender.vis @@ -1,13 +1,15 @@ CATCH incorrect_pin flag_incorrect_pin 1 CATCH profile_update_success flag_allow_update 1 -LOAD save_gender 0 MOUT male 1 MOUT female 2 MOUT unspecified 3 MOUT back 0 HALT -RELOAD save_gender INCMP _ 0 -INCMP pin_entry * +INCMP set_male 1 +INCMP set_female 2 +INCMP set_unspecified 3 + + diff --git a/services/registration/select_language.vis b/services/registration/select_language.vis index aa83e0c..54f08e9 100644 --- a/services/registration/select_language.vis +++ b/services/registration/select_language.vis @@ -1,6 +1,6 @@ MOUT english 0 MOUT kiswahili 1 HALT -INCMP set_default 0 +INCMP set_eng 0 INCMP set_swa 1 INCMP . * diff --git a/services/registration/set_default.vis b/services/registration/set_eng.vis similarity index 100% rename from services/registration/set_default.vis rename to services/registration/set_eng.vis diff --git a/services/registration/set_female.vis b/services/registration/set_female.vis new file mode 100644 index 0000000..723b080 --- /dev/null +++ b/services/registration/set_female.vis @@ -0,0 +1,4 @@ +LOAD save_gender 0 +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH profile_update_success flag_allow_update 1 +MOVE pin_entry diff --git a/services/registration/set_male.vis b/services/registration/set_male.vis new file mode 100644 index 0000000..723b080 --- /dev/null +++ b/services/registration/set_male.vis @@ -0,0 +1,4 @@ +LOAD save_gender 0 +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH profile_update_success flag_allow_update 1 +MOVE pin_entry diff --git a/services/registration/set_unspecified.vis b/services/registration/set_unspecified.vis new file mode 100644 index 0000000..723b080 --- /dev/null +++ b/services/registration/set_unspecified.vis @@ -0,0 +1,4 @@ +LOAD save_gender 0 +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH profile_update_success flag_allow_update 1 +MOVE pin_entry From 0dea34daab9517ffd54f8cb2a328d1cfbe72f064 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 24 Sep 2024 09:18:21 +0300 Subject: [PATCH 05/12] resolve confilict --- internal/handlers/handlerservice.go | 72 ++++++++++++++--------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/internal/handlers/handlerservice.go b/internal/handlers/handlerservice.go index c507d35..4cedd26 100644 --- a/internal/handlers/handlerservice.go +++ b/internal/handlers/handlerservice.go @@ -57,42 +57,42 @@ func (ls *LocalHandlerService) GetHandler() (*ussd.Handlers, error) { if err != nil { return nil, err } - ussdHandlers = ussdHandlers.WithPersister(localHandlerService.Pe) - localHandlerService.DbRs.AddLocalFunc("set_language", ussdHandlers.SetLanguage) - localHandlerService.DbRs.AddLocalFunc("create_account", ussdHandlers.CreateAccount) - localHandlerService.DbRs.AddLocalFunc("save_pin", ussdHandlers.SavePin) - localHandlerService.DbRs.AddLocalFunc("verify_pin", ussdHandlers.VerifyPin) - localHandlerService.DbRs.AddLocalFunc("check_identifier", ussdHandlers.CheckIdentifier) - localHandlerService.DbRs.AddLocalFunc("check_account_status", ussdHandlers.CheckAccountStatus) - localHandlerService.DbRs.AddLocalFunc("authorize_account", ussdHandlers.Authorize) - localHandlerService.DbRs.AddLocalFunc("quit", ussdHandlers.Quit) - localHandlerService.DbRs.AddLocalFunc("check_balance", ussdHandlers.CheckBalance) - localHandlerService.DbRs.AddLocalFunc("validate_recipient", ussdHandlers.ValidateRecipient) - localHandlerService.DbRs.AddLocalFunc("transaction_reset", ussdHandlers.TransactionReset) - localHandlerService.DbRs.AddLocalFunc("max_amount", ussdHandlers.MaxAmount) - localHandlerService.DbRs.AddLocalFunc("validate_amount", ussdHandlers.ValidateAmount) - localHandlerService.DbRs.AddLocalFunc("reset_transaction_amount", ussdHandlers.ResetTransactionAmount) - localHandlerService.DbRs.AddLocalFunc("get_recipient", ussdHandlers.GetRecipient) - localHandlerService.DbRs.AddLocalFunc("get_sender", ussdHandlers.GetSender) - localHandlerService.DbRs.AddLocalFunc("get_amount", ussdHandlers.GetAmount) - localHandlerService.DbRs.AddLocalFunc("reset_incorrect", ussdHandlers.ResetIncorrectPin) - localHandlerService.DbRs.AddLocalFunc("save_firstname", ussdHandlers.SaveFirstname) - localHandlerService.DbRs.AddLocalFunc("save_familyname", ussdHandlers.SaveFamilyname) - localHandlerService.DbRs.AddLocalFunc("save_gender", ussdHandlers.SaveGender) - localHandlerService.DbRs.AddLocalFunc("save_location", ussdHandlers.SaveLocation) - localHandlerService.DbRs.AddLocalFunc("save_yob", ussdHandlers.SaveYob) - localHandlerService.DbRs.AddLocalFunc("save_offerings", ussdHandlers.SaveOfferings) - localHandlerService.DbRs.AddLocalFunc("quit_with_balance", ussdHandlers.QuitWithBalance) - localHandlerService.DbRs.AddLocalFunc("reset_account_authorized", ussdHandlers.ResetAccountAuthorized) - localHandlerService.DbRs.AddLocalFunc("reset_allow_update", ussdHandlers.ResetAllowUpdate) - localHandlerService.DbRs.AddLocalFunc("get_profile_info", ussdHandlers.GetProfileInfo) - localHandlerService.DbRs.AddLocalFunc("verify_yob", ussdHandlers.VerifyYob) - localHandlerService.DbRs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob) - localHandlerService.DbRs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction) - localHandlerService.DbRs.AddLocalFunc("save_temporary_pin", ussdHandlers.SaveTemporaryPin) - localHandlerService.DbRs.AddLocalFunc("verify_new_pin", ussdHandlers.VerifyNewPin) - localHandlerService.DbRs.AddLocalFunc("confirm_pin_change", ussdHandlers.ConfirmPinChange) - localHandlerService.DbRs.AddLocalFunc("quit_with_help", ussdHandlers.QuitWithHelp) + ussdHandlers = ussdHandlers.WithPersister(ls.Pe) + ls.DbRs.AddLocalFunc("set_language", ussdHandlers.SetLanguage) + ls.DbRs.AddLocalFunc("create_account", ussdHandlers.CreateAccount) + ls.DbRs.AddLocalFunc("save_pin", ussdHandlers.SavePin) + ls.DbRs.AddLocalFunc("verify_pin", ussdHandlers.VerifyPin) + ls.DbRs.AddLocalFunc("check_identifier", ussdHandlers.CheckIdentifier) + ls.DbRs.AddLocalFunc("check_account_status", ussdHandlers.CheckAccountStatus) + ls.DbRs.AddLocalFunc("authorize_account", ussdHandlers.Authorize) + ls.DbRs.AddLocalFunc("quit", ussdHandlers.Quit) + ls.DbRs.AddLocalFunc("check_balance", ussdHandlers.CheckBalance) + ls.DbRs.AddLocalFunc("validate_recipient", ussdHandlers.ValidateRecipient) + ls.DbRs.AddLocalFunc("transaction_reset", ussdHandlers.TransactionReset) + ls.DbRs.AddLocalFunc("max_amount", ussdHandlers.MaxAmount) + ls.DbRs.AddLocalFunc("validate_amount", ussdHandlers.ValidateAmount) + ls.DbRs.AddLocalFunc("reset_transaction_amount", ussdHandlers.ResetTransactionAmount) + ls.DbRs.AddLocalFunc("get_recipient", ussdHandlers.GetRecipient) + ls.DbRs.AddLocalFunc("get_sender", ussdHandlers.GetSender) + ls.DbRs.AddLocalFunc("get_amount", ussdHandlers.GetAmount) + ls.DbRs.AddLocalFunc("reset_incorrect", ussdHandlers.ResetIncorrectPin) + ls.DbRs.AddLocalFunc("save_firstname", ussdHandlers.SaveFirstname) + ls.DbRs.AddLocalFunc("save_familyname", ussdHandlers.SaveFamilyname) + ls.DbRs.AddLocalFunc("save_gender", ussdHandlers.SaveGender) + ls.DbRs.AddLocalFunc("save_location", ussdHandlers.SaveLocation) + ls.DbRs.AddLocalFunc("save_yob", ussdHandlers.SaveYob) + ls.DbRs.AddLocalFunc("save_offerings", ussdHandlers.SaveOfferings) + ls.DbRs.AddLocalFunc("quit_with_balance", ussdHandlers.QuitWithBalance) + ls.DbRs.AddLocalFunc("reset_account_authorized", ussdHandlers.ResetAccountAuthorized) + ls.DbRs.AddLocalFunc("reset_allow_update", ussdHandlers.ResetAllowUpdate) + ls.DbRs.AddLocalFunc("get_profile_info", ussdHandlers.GetProfileInfo) + ls.DbRs.AddLocalFunc("verify_yob", ussdHandlers.VerifyYob) + ls.DbRs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob) + ls.DbRs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction) + ls.DbRs.AddLocalFunc("save_temporary_pin", ussdHandlers.SaveTemporaryPin) + ls.DbRs.AddLocalFunc("verify_new_pin", ussdHandlers.VerifyNewPin) + ls.DbRs.AddLocalFunc("confirm_pin_change", ussdHandlers.ConfirmPinChange) + ls.DbRs.AddLocalFunc("quit_with_help", ussdHandlers.QuitWithHelp) return ussdHandlers, nil } From 6ad67f6adc97095d08b35028ef94e08b6e0103a0 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 11:38:07 +0300 Subject: [PATCH 06/12] change position of LOAD --- services/registration/transaction_pin.vis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/registration/transaction_pin.vis b/services/registration/transaction_pin.vis index cadbdcf..a0941ed 100644 --- a/services/registration/transaction_pin.vis +++ b/services/registration/transaction_pin.vis @@ -5,8 +5,8 @@ RELOAD get_sender MAP get_sender MOUT back 0 MOUT quit 9 -HALT LOAD authorize_account 6 +HALT RELOAD authorize_account CATCH incorrect_pin flag_incorrect_pin 1 INCMP _ 0 From 4db862bc97147eac7609f31fa4b20b20ca3cab7c Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 14:13:26 +0300 Subject: [PATCH 07/12] LOAD and RELOAD get_amount --- services/registration/transaction_initiated.vis | 2 +- services/registration/transaction_pin | 2 +- services/registration/transaction_pin.vis | 3 ++- services/registration/transaction_pin_swa | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/services/registration/transaction_initiated.vis b/services/registration/transaction_initiated.vis index 3b8b9f6..f8cf19c 100644 --- a/services/registration/transaction_initiated.vis +++ b/services/registration/transaction_initiated.vis @@ -1,7 +1,7 @@ LOAD reset_incorrect 6 CATCH incorrect_pin flag_incorrect_pin 1 CATCH _ flag_account_authorized 0 -LOAD get_amount 10 +RELOAD get_amount MAP get_amount RELOAD get_recipient MAP get_recipient diff --git a/services/registration/transaction_pin b/services/registration/transaction_pin index 7b6bddb..a1b7125 100644 --- a/services/registration/transaction_pin +++ b/services/registration/transaction_pin @@ -1,2 +1,2 @@ -{{.get_recipient}} will receive {{.validate_amount}} from {{.get_sender}} +{{.get_recipient}} will receive {{.get_amount}} from {{.get_sender}} Please enter your PIN to confirm: \ No newline at end of file diff --git a/services/registration/transaction_pin.vis b/services/registration/transaction_pin.vis index a0941ed..0388f0c 100644 --- a/services/registration/transaction_pin.vis +++ b/services/registration/transaction_pin.vis @@ -1,4 +1,5 @@ -MAP validate_amount +RELOAD get_amount +MAP get_amount RELOAD get_recipient MAP get_recipient RELOAD get_sender diff --git a/services/registration/transaction_pin_swa b/services/registration/transaction_pin_swa index 8529f0e..1924166 100644 --- a/services/registration/transaction_pin_swa +++ b/services/registration/transaction_pin_swa @@ -1,2 +1,2 @@ -{{.get_recipient}} atapokea {{.validate_amount}} kutoka kwa {{.get_sender}} +{{.get_recipient}} atapokea {{.get_amount}} kutoka kwa {{.get_sender}} Tafadhali weka PIN yako kudhibitisha: \ No newline at end of file From b15ba367c468571e32d3dde6d795507b6dfad2e2 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 14:16:01 +0300 Subject: [PATCH 08/12] change position of LOAD function --- services/registration/amount.vis | 1 + services/registration/change_language.vis | 1 - services/registration/main.vis | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/registration/amount.vis b/services/registration/amount.vis index 9b2970a..b491fab 100644 --- a/services/registration/amount.vis +++ b/services/registration/amount.vis @@ -9,4 +9,5 @@ CATCH invalid_amount flag_invalid_amount 1 INCMP _ 0 LOAD get_recipient 12 LOAD get_sender 64 +LOAD get_amount 12 INCMP transaction_pin * diff --git a/services/registration/change_language.vis b/services/registration/change_language.vis index 05ca95b..b33acf1 100644 --- a/services/registration/change_language.vis +++ b/services/registration/change_language.vis @@ -1,4 +1,3 @@ -LOAD reset_account_authorized 0 LOAD reset_incorrect 0 CATCH incorrect_pin flag_incorrect_pin 1 CATCH pin_entry flag_account_authorized 0 diff --git a/services/registration/main.vis b/services/registration/main.vis index d883dca..4e27a79 100644 --- a/services/registration/main.vis +++ b/services/registration/main.vis @@ -1,3 +1,4 @@ +LOAD reset_account_authorized 0 LOAD check_balance 64 RELOAD check_balance MAP check_balance From 77e4c5d43a6c67f2db8fc9f7ea0add7f8f0fed62 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Sep 2024 21:20:57 +0300 Subject: [PATCH 09/12] reset the positon of LOAD function --- services/registration/change_language.vis | 1 + services/registration/main.vis | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/services/registration/change_language.vis b/services/registration/change_language.vis index b33acf1..05ca95b 100644 --- a/services/registration/change_language.vis +++ b/services/registration/change_language.vis @@ -1,3 +1,4 @@ +LOAD reset_account_authorized 0 LOAD reset_incorrect 0 CATCH incorrect_pin flag_incorrect_pin 1 CATCH pin_entry flag_account_authorized 0 diff --git a/services/registration/main.vis b/services/registration/main.vis index 4e27a79..d883dca 100644 --- a/services/registration/main.vis +++ b/services/registration/main.vis @@ -1,4 +1,3 @@ -LOAD reset_account_authorized 0 LOAD check_balance 64 RELOAD check_balance MAP check_balance From 8648ea599cadba0b3c3de1f010346acad84c6f9d Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 24 Sep 2024 13:37:14 +0300 Subject: [PATCH 10/12] add catch node --- services/registration/_catch | 1 + services/registration/_catch.vis | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 services/registration/_catch create mode 100644 services/registration/_catch.vis diff --git a/services/registration/_catch b/services/registration/_catch new file mode 100644 index 0000000..e81b8e9 --- /dev/null +++ b/services/registration/_catch @@ -0,0 +1 @@ +Something went wrong.Please try again \ No newline at end of file diff --git a/services/registration/_catch.vis b/services/registration/_catch.vis new file mode 100644 index 0000000..0d20253 --- /dev/null +++ b/services/registration/_catch.vis @@ -0,0 +1,2 @@ +HALT +MOVE ^ From cc760e7698aa60011a4cefd12cd1cdfa3f602258 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 24 Sep 2024 21:21:35 +0300 Subject: [PATCH 11/12] remove move --- services/registration/_catch.vis | 1 - 1 file changed, 1 deletion(-) diff --git a/services/registration/_catch.vis b/services/registration/_catch.vis index 0d20253..72e55ad 100644 --- a/services/registration/_catch.vis +++ b/services/registration/_catch.vis @@ -1,2 +1 @@ HALT -MOVE ^ From 6dbd2506946dac86aaf860f0acd64afc32757fa3 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Wed, 25 Sep 2024 09:29:26 +0300 Subject: [PATCH 12/12] remove extra spaces --- internal/utils/isocode.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/utils/isocode.go b/internal/utils/isocode.go index 34365b0..3bdfbeb 100644 --- a/internal/utils/isocode.go +++ b/internal/utils/isocode.go @@ -1,8 +1,5 @@ package utils - - - var isoCodes = map[string]bool{ "eng": true, // English "swa": true, // Swahili @@ -12,4 +9,3 @@ var isoCodes = map[string]bool{ func IsValidISO639(code string) bool { return isoCodes[code] } -