refactor db accessor
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
type UserSignSession struct {
|
||||
SessionId m.SessionId
|
||||
Id m.SessionId
|
||||
CustomerId m.CustomerId
|
||||
LoginUserInterface UserInterface
|
||||
Kp m.KeypadDimension
|
||||
@@ -19,6 +19,7 @@ type UserSignSession struct {
|
||||
ConfirmIdxInterface m.IdxInterface
|
||||
SetKeySelection m.KeySelection
|
||||
Username m.Username
|
||||
Expire int
|
||||
}
|
||||
|
||||
func NewSignupSession(kp m.KeypadDimension, customerId m.CustomerId) (*UserSignSession, error) {
|
||||
@@ -31,7 +32,7 @@ func NewSignupSession(kp m.KeypadDimension, customerId m.CustomerId) (*UserSignS
|
||||
return nil, err
|
||||
}
|
||||
session := UserSignSession{
|
||||
SessionId: m.SessionId(uuid.New()),
|
||||
Id: m.SessionId(uuid.New()),
|
||||
CustomerId: customerId,
|
||||
LoginUserInterface: *loginInterface,
|
||||
SetIdxInterface: signupInterface.IdxInterface,
|
||||
@@ -108,7 +109,7 @@ func (s *UserSignSession) SetUserNKode(username m.Username, keySelection m.KeySe
|
||||
s.SetKeySelection = keySelection
|
||||
s.Username = username
|
||||
setKp := s.SignupKeypad()
|
||||
setInterface := UserInterface{IdxInterface: s.SetIdxInterface, kp: &setKp}
|
||||
setInterface := UserInterface{IdxInterface: s.SetIdxInterface, Kp: &setKp}
|
||||
err := setInterface.DisperseInterface()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -159,7 +160,7 @@ func signupInterface(baseUserInterface UserInterface, kp m.KeypadDimension) (*Us
|
||||
}
|
||||
signupUserInterface := UserInterface{
|
||||
IdxInterface: util.MatrixToList(attrSetView),
|
||||
kp: &m.KeypadDimension{
|
||||
Kp: &m.KeypadDimension{
|
||||
AttrsPerKey: numbOfKeys,
|
||||
NumbOfKeys: numbOfKeys,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user