Skip to content

Commit a396083

Browse files
committed
fix: unauth user ttl
1 parent adaec16 commit a396083

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
const (
11-
Version string = "0.18.5"
11+
Version string = "0.18.6"
1212
)
1313

1414
var VersionCmd = &cobra.Command{

dao/db.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ func createIndex(ctx context.Context) {
215215

216216
unauthUserCollection.Indexes().CreateMany(ctx, []mongo.IndexModel{
217217
{
218-
Keys: bson.D{{Key: "updated_at", Value: 1}},
219-
Options: options.Index().SetExpireAfterSeconds(600).SetName("updated_at"),
218+
Keys: bson.D{{Key: "created_at", Value: 1}},
219+
Options: options.Index().SetExpireAfterSeconds(600).SetName("created_at"),
220220
},
221221
{
222222
Keys: bson.D{{Key: "username", Value: 1}},

model/user.go

+1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ type UnauthUserModel struct {
4545
TelegramID int64 `bson:"telegram_id"`
4646
Email string `bson:"email"`
4747
AuthMethod types.AuthMethod `bson:"auth_method"`
48+
CreatedAt primitive.DateTime `bson:"created_at"`
4849
}

0 commit comments

Comments
 (0)