Compare commits

..

1 Commits

Author SHA1 Message Date
f4f4fdd3ac issue-205:
added comments for menu handlers methods and changed function name to better fit function workings.
2024-12-25 15:59:28 +01:00

View File

@ -81,8 +81,8 @@ type Handlers struct {
ReplaceSeparatorFunc func(string) string
}
// NewHandlers creates a new instance of the Handlers struct with the provided dependencies.
func NewHandlers(appFlags *asm.FlagParser, userdataStore db.Db, adminstore *utils.AdminStore, accountService remote.AccountServiceInterface, replaceSeparatorFunc func(string) string) (*Handlers, error) {
// NewHandlers creates a new instance of the Handlers struct with the provided dependencies.
if userdataStore == nil {
return nil, fmt.Errorf("cannot create handler with nil userdata store")
}
@ -178,7 +178,7 @@ func (h *Handlers) SetLanguage(ctx context.Context, sym string, input []byte) (r
return res, nil
}
// createAccountNoExist handles the account creation when no existing account is present for the session and stores associated data in the user data store.
// handles the account creation when no existing account is present for the session and stores associated data in the user data store.
func (h *Handlers) createAccountNoExist(ctx context.Context, sessionId string, res *resource.Result) error {
flag_account_created, _ := h.flagManager.GetFlag("flag_account_created")
r, err := h.accountService.CreateAccount(ctx)