Skip to content

Commit

Permalink
fix: id and add fund house
Browse files Browse the repository at this point in the history
  • Loading branch information
Sama-004 committed Oct 28, 2024
1 parent 03bd3d0 commit 665e132
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/parse_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,14 @@ func uploadToCloudinary(fileURL string) {
month := extractMonth(publicID)
fileUUID := uuid.New().String()
document := bson.M{
"_id": fileUUID,
"month": month,
"completeName": publicID,
"cloudinaryLink": resp.SecureURL,
"id": fileUUID,
"fund_house": "nippon",
}

collection := mongo_client.Client.Database(os.Getenv("DATABASE")).Collection(os.Getenv("COLLECTION"))
collection := mongo_client.Client.Database(os.Getenv("DATABASE_NAME")).Collection(os.Getenv("COLLECTION_NAME"))
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
_, err = collection.InsertOne(ctx, document)
Expand Down

0 comments on commit 665e132

Please sign in to comment.