Update MongoDB Driver and Configuration for Company Entities
- Updated the MongoDB driver from v1.17.4 to v2.3.0, ensuring compatibility with the latest features and improvements. - Refactored company-related entity and repository files to utilize the new driver, replacing `primitive.ObjectID` with `bson.ObjectID` for ID handling. - Adjusted the configuration in `.drone.yml` to include the `main` branch in the trigger settings, enhancing CI/CD pipeline flexibility.
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"tm/pkg/logger"
|
||||
"tm/pkg/response"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
@@ -368,7 +368,7 @@ func (s *userService) RefreshToken(ctx context.Context, refreshToken string) (*A
|
||||
}
|
||||
|
||||
// Get user information
|
||||
userID, err := primitive.ObjectIDFromHex(validationResult.Claims.UserID)
|
||||
userID, err := bson.ObjectIDFromHex(validationResult.Claims.UserID)
|
||||
if err != nil {
|
||||
s.logger.Error("Failed to parse user ID from token", map[string]interface{}{
|
||||
"error": err.Error(),
|
||||
|
||||
Reference in New Issue
Block a user