working commit
This commit is contained in:
+5
-5
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"mbase/app/descriptor"
|
||||
"mbase/app/descr"
|
||||
"mbase/pkg/mbctl"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
@@ -15,7 +15,7 @@ func (lg *Logic) GetDump(ctx context.Context, accountID int64, params *mbctl.Get
|
||||
var err error
|
||||
res := &mbctl.GetDumpResult{}
|
||||
|
||||
grantExists, _, err := lg.db.GetGrant(ctx, accountID, descriptor.GrantModifyDatabase)
|
||||
grantExists, _, err := lg.db.GetGrant(ctx, accountID, descr.GrantModifyDatabase)
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
@@ -40,7 +40,7 @@ func (lg *Logic) GetDump(ctx context.Context, accountID int64, params *mbctl.Get
|
||||
}
|
||||
lg.DumpingSemDown()
|
||||
|
||||
dump := descriptor.Dump{
|
||||
dump := descr.Dump{
|
||||
Timestamp: time.Now().Format(time.RFC3339),
|
||||
Accounts: listAccounts,
|
||||
Grants: listGrants,
|
||||
@@ -59,7 +59,7 @@ func (lg *Logic) RestoreDump(ctx context.Context, accountID int64, params *mbctl
|
||||
var err error
|
||||
res := &mbctl.RestoreDumpResult{}
|
||||
|
||||
grantExists, _, err := lg.db.GetGrant(ctx, accountID, descriptor.GrantModifyDatabase)
|
||||
grantExists, _, err := lg.db.GetGrant(ctx, accountID, descr.GrantModifyDatabase)
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
@@ -71,7 +71,7 @@ func (lg *Logic) RestoreDump(ctx context.Context, accountID int64, params *mbctl
|
||||
lg.WaitDumping()
|
||||
lg.WaitRestoring()
|
||||
|
||||
var dump descriptor.Dump
|
||||
var dump descr.Dump
|
||||
|
||||
err = yaml.Unmarshal([]byte(params.Dump), &dump)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user