profile-edit-traverse #199

Merged
lash merged 26 commits from profile-edit-traverse into master 2024-12-05 16:37:37 +01:00
Showing only changes of commit 9cbbdff993 - Show all commits

View File

@ -1966,13 +1966,13 @@ func (h *Handlers) insertProfileItems(ctx context.Context, sessionId string, res
"flag_location_set", "flag_location_set",
"flag_offerings_set", "flag_offerings_set",
} }
profileDataKeys := map[int]common.DataTyp{ profileDataKeys := []common.DataTyp{
Outdated
Review

isn't it easier and less code to iterate a map?

isn't it easier and less code to iterate a map?

handled by commit: 321f038c7c

handled by commit: 321f038c7ce4492d05bd35572e68d669b7c05a9b
Outdated
Review

IIRC this was the switch-case statement previously?. This can still be an array, and profileDataKeys[index] can address the index in the array?

IIRC this was the switch-case statement previously?. This can still be an array, and profileDataKeys[index] can address the index in the array?
0: common.DATA_FIRST_NAME, common.DATA_FIRST_NAME,
1: common.DATA_FAMILY_NAME, common.DATA_FAMILY_NAME,
2: common.DATA_GENDER, common.DATA_GENDER,
3: common.DATA_YOB, common.DATA_YOB,
4: common.DATA_LOCATION, common.DATA_LOCATION,
5: common.DATA_OFFERINGS, common.DATA_OFFERINGS,
} }
for index, profileItem := range h.profile.ProfileItems { for index, profileItem := range h.profile.ProfileItems {
// Ensure the profileItem is not "0"(is set) // Ensure the profileItem is not "0"(is set)