From 665e13287a420d393d0ce52714e0437d415abf3a Mon Sep 17 00:00:00 2001 From: sama-004 <70210929+Sama-004@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:45:35 +0530 Subject: [PATCH] fix: id and add fund house --- services/parse_service.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/parse_service.go b/services/parse_service.go index fa477d3..3e03746 100644 --- a/services/parse_service.go +++ b/services/parse_service.go @@ -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)