Skip to content

Commit

Permalink
fix: rename collection
Browse files Browse the repository at this point in the history
Signed-off-by: namkyu1999 <[email protected]>
  • Loading branch information
namkyu1999 committed Jul 12, 2023
1 parent ea12f0d commit 4d7720d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions litmus-portal/authentication/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ func main() {
}

// Creating Session Collection
if err = utils.CreateCollection(utils.SessionCollection, db); err != nil {
if err = utils.CreateCollection(utils.RevokedTokenCollection, db); err != nil {
log.Fatalf("failed to create collection %s", err)
}

if err = utils.CreateTTLIndex(utils.SessionCollection, db); err != nil {
if err = utils.CreateTTLIndex(utils.RevokedTokenCollection, db); err != nil {
log.Fatalf("failed to create index %s", err)
}

Expand All @@ -95,8 +95,8 @@ func main() {
projectCollection := db.Collection(utils.ProjectCollection)
projectRepo := project.NewRepo(projectCollection)

sessionCollection := db.Collection(utils.SessionCollection)
sessionRepo := session.NewRepo(sessionCollection)
revokedTokenCollection := db.Collection(utils.RevokedTokenCollection)
sessionRepo := session.NewRepo(revokedTokenCollection)

miscRepo := misc.NewRepo(db, client)

Expand Down
2 changes: 1 addition & 1 deletion litmus-portal/authentication/pkg/utils/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var (
GrpcPort = ":3030"
UserCollection = "users"
ProjectCollection = "project"
SessionCollection = "session"
RevokedTokenCollection = "revoked-token"
UsernameField = "username"
ExpireOnField = "expire_on"
PasswordEncryptionCost = 15
Expand Down

0 comments on commit 4d7720d

Please sign in to comment.