Skip to content

Commit

Permalink
forgot to update db generator
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Apr 16, 2018
1 parent b8006f4 commit 7e347ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tinode-db/gendb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"strings"
"time"

"github.com/tinode/chat/server/auth"
_ "github.com/tinode/chat/server/auth/basic"
"github.com/tinode/chat/server/store"
"github.com/tinode/chat/server/store/types"
Expand Down Expand Up @@ -97,8 +98,8 @@ func genDb(reset bool, dbsource string, data *Data) {
// Generate random password
passwd = getPassword(8)
}
if _, err := authHandler.AddRecord(user.Uid(),
[]byte(uu.Username+":"+passwd), 0); err != nil {
if _, err := authHandler.AddRecord(&auth.Rec{Uid: user.Uid()},
[]byte(uu.Username+":"+passwd)); err != nil {

log.Fatal(err)
}
Expand Down

0 comments on commit 7e347ce

Please sign in to comment.