Skip to content

Commit

Permalink
Merge pull request #224 from Real-Dev-Squad/develop
Browse files Browse the repository at this point in the history
Dev to main
  • Loading branch information
lakshayman authored Sep 15, 2024
2 parents 753758d + 663bc5c commit bc390aa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
--image-repository ${IMAGE_REPOSITORY} \
--region ${REGION} \
--output-template-file packaged.yaml
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: packaged.yaml
path: packaged.yaml
Expand All @@ -76,7 +76,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- uses: aws-actions/setup-sam@v1
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: packaged.yaml

Expand Down
2 changes: 1 addition & 1 deletion layer/utils/firestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func getLastDiff(client *firestore.Client, ctx context.Context, userId string, a

func generateAndStoreDiff(client *firestore.Client, ctx context.Context, res Res, userId string, sessionId string) error {
newDiff := resToDiff(res, userId)
_, err := client.Collection("users").Doc(userId).Collection("diffs").Doc("diff_"+userId).Set(ctx, newDiff)
_, _, err := client.Collection("profileDiffs").Add(ctx, diffToMap(newDiff))
if err != nil {
return err
}
Expand Down
2 changes: 2 additions & 0 deletions layer/utils/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func logProfileStored(client *firestore.Client, ctx context.Context, diff Diff,
"sessionId": sessionId,
},
Body: map[string]interface{}{
"userId": userId,
"profile": diffToMap(diff),
},
}
Expand Down Expand Up @@ -51,6 +52,7 @@ func LogHealth(client *firestore.Client, ctx context.Context, userId string, isS
"sessionId": sessionId,
},
Body: map[string]interface{}{
"userId": userId,
"serviceRunning": isServiceRunning,
},
}
Expand Down
1 change: 1 addition & 0 deletions layer/utils/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

func resToDiff(res Res, userId string) Diff {
return Diff{
Approval: "PENDING",
UserId: userId,
Timestamp: time.Now(),
FirstName: res.FirstName,
Expand Down

0 comments on commit bc390aa

Please sign in to comment.