Skip to content

Commit

Permalink
fix timestamp logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MehulKChaudhari committed Mar 23, 2024
1 parent 10940f7 commit d80e140
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion call-profile/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func setProfileStatusBlocked(client *firestore.Client, ctx context.Context, user
client.Collection("users").Doc(userId).Set(ctx, map[string]interface{}{
"profileStatus": Constants["STATUS_BLOCKED"],
"chaincode": "",
"updated_at": time.Now().UnixNano() / int64(time.Millisecond),
"updated_at": time.Now().UnixMilli(),
}, firestore.MergeAll)

if discordId != "" {
Expand Down
5 changes: 3 additions & 2 deletions verify/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import (
firebase "firebase.google.com/go"
"google.golang.org/api/option"

"cloud.google.com/go/firestore"
"crypto/sha512"

"cloud.google.com/go/firestore"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go/aws/session"
Expand Down Expand Up @@ -135,7 +136,7 @@ func setProfileStatus(client *firestore.Client, ctx context.Context, id string,
newData = map[string]interface{}{
"profileStatus": status,
"chaincode": "",
"updated_at": time.Now().UnixNano() / int64(time.Millisecond),
"updated_at": time.Now().UnixMilli(),
}
}

Expand Down

0 comments on commit d80e140

Please sign in to comment.