Skip to content

Commit

Permalink
wrong operator
Browse files Browse the repository at this point in the history
  • Loading branch information
beyazit committed Apr 7, 2022
1 parent ab8eee8 commit 3096ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongodb/main.go
Expand Up @@ -104,7 +104,7 @@ func main() {

var result Employee

if err != mg.Db.Collection("employees").FindOne(c.Context(), filter).Decode(&result); err != nil {
if err := mg.Db.Collection("employees").FindOne(c.Context(), filter).Decode(&result); err != nil {
return c.Status(500).SendString("Something went wrong.")
}

Expand Down

0 comments on commit 3096ebe

Please sign in to comment.