From 9cbbdff993026f33e05d0eaab7de32dc6a6c7392 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Thu, 5 Dec 2024 18:25:51 +0300 Subject: [PATCH] chore: use profileDataKeys as an array --- internal/handlers/ussd/menuhandler.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index fef4d98..4a1774e 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -1966,13 +1966,13 @@ func (h *Handlers) insertProfileItems(ctx context.Context, sessionId string, res "flag_location_set", "flag_offerings_set", } - profileDataKeys := map[int]common.DataTyp{ - 0: common.DATA_FIRST_NAME, - 1: common.DATA_FAMILY_NAME, - 2: common.DATA_GENDER, - 3: common.DATA_YOB, - 4: common.DATA_LOCATION, - 5: common.DATA_OFFERINGS, + profileDataKeys := []common.DataTyp{ + common.DATA_FIRST_NAME, + common.DATA_FAMILY_NAME, + common.DATA_GENDER, + common.DATA_YOB, + common.DATA_LOCATION, + common.DATA_OFFERINGS, } for index, profileItem := range h.profile.ProfileItems { // Ensure the profileItem is not "0"(is set)