Skip to content

Commit

Permalink
add secret
Browse files Browse the repository at this point in the history
  • Loading branch information
y-du committed Feb 23, 2024
1 parent 055373d commit 846bce0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (a *Api) PairMachine(ctx context.Context, meta map[string]any) (lib_model.C
return cr, nil
}

func (a *Api) CreateInitialIdentity(ctx context.Context, username string, delay time.Duration, retries int) {
func (a *Api) CreateInitialIdentity(ctx context.Context, username, secret string, delay time.Duration, retries int) {
go func() {
identities, err := a.getIdentities(ctx, delay, retries)
if err != nil {
Expand All @@ -88,7 +88,7 @@ func (a *Api) CreateInitialIdentity(ctx context.Context, username string, delay
"first_name": "Initial",
"last_name": "User",
},
}, "")
}, secret)
if err != nil {
util.Logger.Errorf("creating initial identity failed: %s", err)
return
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func main() {
return nil
})

mApi.CreateInitialIdentity(diCtx, config.InitialIdentity, time.Second*5, 20)
mApi.CreateInitialIdentity(diCtx, config.InitIdentity.User, config.InitIdentity.Secret.String(), time.Second*5, 20)

go func() {
defer srvCF()
Expand Down

0 comments on commit 846bce0

Please sign in to comment.