working commit
This commit is contained in:
@@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"mbase/app/descr"
|
||||
"mbase/pkg/auxid"
|
||||
"mbase/pkg/descr"
|
||||
"mbase/pkg/auxuuid"
|
||||
"mbase/pkg/auxpwd"
|
||||
)
|
||||
|
||||
@@ -23,9 +23,9 @@ func (lg *Logic) CleanDatabase(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (lg *Logic) SeedAccount(ctx context.Context) (int64, error) {
|
||||
func (lg *Logic) SeedAccount(ctx context.Context) (string, error) {
|
||||
var err error
|
||||
var accountID int64
|
||||
var accountID string
|
||||
accountDescrs, err := lg.db.ReducedListAccounts(ctx)
|
||||
if err != nil {
|
||||
return accountID, err
|
||||
@@ -35,7 +35,7 @@ func (lg *Logic) SeedAccount(ctx context.Context) (int64, error) {
|
||||
now := time.Now().Format(time.RFC3339)
|
||||
passhash := auxpwd.MakeSHA256Hash([]byte(defaultSeedPassword))
|
||||
accountDescr := &descr.Account{
|
||||
ID: auxid.GenID(),
|
||||
ID: auxuuid.NewUUID(),
|
||||
Username: defaultSeedUsername,
|
||||
Passhash: passhash,
|
||||
Disabled: false,
|
||||
@@ -63,9 +63,7 @@ func (lg *Logic) SeedAccount(ctx context.Context) (int64, error) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return accountID, err
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user