Skip to content

Commit

Permalink
Removes unnecessary argments to PutObjectWithContext while persisting…
Browse files Browse the repository at this point in the history
… data.
  • Loading branch information
Mathieu Leduc-Hamel committed Mar 8, 2021
1 parent 812b760 commit aa1d725
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/store/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,9 @@ func (s *S3) Persist(ctx context.Context, data *Data) error {

s.cfg.Logger().Debug().Str("key", key).Str("body", bodyStr).Msg("Starting Persistence")
_, err = s.client.PutObjectWithContext(ctx, &s3.PutObjectInput{
Bucket: aws.String(s.cfg.S3Bucket()),
Key: aws.String(key),
Body: strings.NewReader(bodyStr),
GrantRead: aws.String("GrantRead"),
ContentType: aws.String("application/json"),
Bucket: aws.String(s.cfg.S3Bucket()),
Key: aws.String(key),
Body: strings.NewReader(bodyStr),
})
if err != nil {
s.cfg.Logger().Error().Err(err).Str("key", key).Msg("Failed persistence")
Expand Down

0 comments on commit aa1d725

Please sign in to comment.