improve on the subimsion process with automatic submissions
make sure we give each user uniqe id
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/LazyBachelor/LazyPM/internal/models"
|
||||
"github.com/LazyBachelor/LazyPM/internal/storage"
|
||||
"github.com/steveyegge/beads"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
type App = models.App
|
||||
@@ -42,7 +43,7 @@ func New(ctx context.Context, config Config, opts ...Option) (*App, func(), erro
|
||||
|
||||
if b.statsService == nil {
|
||||
statStore := storage.NewJsonStorage(config.StatisticsStoragePath, &models.Statistics{
|
||||
ID: 0,
|
||||
ID: primitive.NewObjectID(),
|
||||
StartTime: time.Now(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user