working commit
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
//"fmt"
|
||||
|
||||
//"mstore/app/descr"
|
||||
"mstore/app/descr"
|
||||
"mstore/app/operator"
|
||||
"mstore/app/router"
|
||||
)
|
||||
@@ -12,13 +10,15 @@ import (
|
||||
func (hand *Handler) CreateAccount(rctx *router.Context) {
|
||||
var err error
|
||||
|
||||
operatorID := descr.AnonymousID
|
||||
|
||||
params := &operator.CreateAccountParams{}
|
||||
err = rctx.BindJSON(params)
|
||||
if err != nil {
|
||||
hand.SendError(rctx, err)
|
||||
return
|
||||
}
|
||||
res, err := hand.oper.CreateAccount(rctx.Ctx, params)
|
||||
res, err := hand.oper.CreateAccount(rctx.Ctx, operatorID, params)
|
||||
if err != nil {
|
||||
hand.logg.Errorf("CreateAccount error: %v", err)
|
||||
hand.SendError(rctx, err)
|
||||
|
||||
Reference in New Issue
Block a user