working commit

This commit is contained in:
2026-06-05 18:25:03 +02:00
commit 7d8abba003
82 changed files with 21863 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
package handler
import (
"context"
"mbase/pkg/mbctl"
)
func (hand *Handler) SetGrant(ctx context.Context, params *mbctl.SetGrantParams) (*mbctl.SetGrantResult, error) {
var err error
hand.log.Debugf("Handle SetGrant call")
res := &mbctl.SetGrantResult{}
accountID, err := hand.Authentificate(ctx)
if err != nil {
return res, err
}
res, err = hand.lg.SetGrant(ctx, accountID, params)
return res, err
}
func (hand *Handler) DeleteGrant(ctx context.Context, params *mbctl.DeleteGrantParams) (*mbctl.DeleteGrantResult, error) {
var err error
hand.log.Debugf("Handle DeleteGrant call")
res := &mbctl.DeleteGrantResult{}
accountID, err := hand.Authentificate(ctx)
if err != nil {
return res, err
}
res, err = hand.lg.DeleteGrant(ctx, accountID, params)
return res, err
}