working commit
This commit is contained in:
@@ -23,7 +23,7 @@ func (hand *Handler) Authentificate(ctx context.Context) (string, error) {
|
||||
}
|
||||
username := meta["username"][0]
|
||||
password := meta["password"][0]
|
||||
validated, accountID, err := hand.lg.ValidateAccount(ctx, username, password)
|
||||
validated, accountID, err := hand.oper.ValidateAccount(ctx, username, password)
|
||||
if !validated {
|
||||
err := status.Errorf(codes.PermissionDenied, "Wrong auth data")
|
||||
return accountID, err
|
||||
@@ -39,7 +39,7 @@ func (hand *Handler) CreateAccount(ctx context.Context, params *mbctl.CreateAcco
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
res, err = hand.lg.CreateAccount(ctx, accountID, params)
|
||||
res, err = hand.oper.CreateAccount(ctx, accountID, params)
|
||||
return res, err
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func (hand *Handler) DeleteAccount(ctx context.Context, params *mbctl.DeleteAcco
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
res, err = hand.lg.DeleteAccount(ctx, accountID, params)
|
||||
res, err = hand.oper.DeleteAccount(ctx, accountID, params)
|
||||
return res, err
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ func (hand *Handler) ListAccounts(ctx context.Context, params *mbctl.ListAccount
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
res, err = hand.lg.ListAccounts(ctx, accountID, params)
|
||||
res, err = hand.oper.ListAccounts(ctx, accountID, params)
|
||||
return res, err
|
||||
}
|
||||
|
||||
@@ -75,6 +75,6 @@ func (hand *Handler) UpdateAccount(ctx context.Context, params *mbctl.UpdateAcco
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
res, err = hand.lg.UpdateAccount(ctx, accountID, params)
|
||||
res, err = hand.oper.UpdateAccount(ctx, accountID, params)
|
||||
return res, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user