Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to main #224

Merged
merged 8 commits into from
Sep 15, 2024
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
Loading