Compare commits
1 Commits
c29cf4029a
...
f4f4fdd3ac
Author | SHA1 | Date | |
---|---|---|---|
f4f4fdd3ac |
@ -81,8 +81,8 @@ type Handlers struct {
|
|||||||
ReplaceSeparatorFunc func(string) string
|
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) {
|
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 {
|
if userdataStore == nil {
|
||||||
return nil, fmt.Errorf("cannot create handler with nil userdata store")
|
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
|
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 {
|
func (h *Handlers) createAccountNoExist(ctx context.Context, sessionId string, res *resource.Result) error {
|
||||||
flag_account_created, _ := h.flagManager.GetFlag("flag_account_created")
|
flag_account_created, _ := h.flagManager.GetFlag("flag_account_created")
|
||||||
r, err := h.accountService.CreateAccount(ctx)
|
r, err := h.accountService.CreateAccount(ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user