Skip to content

Commit

Permalink
fix(*): fixing bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Jan 7, 2025
1 parent 2d22f22 commit 209e58b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions infrastructure/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ func Connect(cfg Config) (*Database, error) {
qCtx, cancel := context.WithTimeout(context.Background(), time.Duration(cfg.QueryTimeout)*time.Millisecond)
_, err := client.Database(cfg.DBName).Collection(collName).Indexes().CreateOne(qCtx, indexModel)
if err != nil {
defer cancel()
cancel()

continue
}
defer cancel()
cancel()
}

return &Database{
Expand Down
4 changes: 2 additions & 2 deletions repository/req.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func (h *Handler) HandleReq(fs filter.Filters) ([]event.Event, error) {
queryKinds[k] = append(queryKinds[k], qf)
}
} else {
//! we query most requested kinds if there is no kind provided.
//? fix::: any better way?
// ! it makes query to the most requested kinds if there is no kind provided.
// ? fix::: any better way?
for _, k := range possibleKinds {
queryKinds[k] = append(queryKinds[k], qf)
}
Expand Down

0 comments on commit 209e58b

Please sign in to comment.