Skip to content

Commit

Permalink
fix go bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnfluegge committed Nov 30, 2024
1 parent 66c2f3b commit 68a6b46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lambda-handler/archive-zettel-handler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,20 @@ func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (
log.Fatalf("Got error calling PutItem: %s", err)
}

result, err := svc.GetItem(&dynamodb.GetItemInput{
user_config, err := svc.GetItem(&dynamodb.GetItemInput{
TableName: aws.String("tnn-UserConfig"),
Key: map[string]*dynamodb.AttributeValue{
"id": {
S: aws.String(body.Zettel.UserId),
},
},
})

if err != nil {
log.Fatalf("Got error calling GetItem: %s", err)
}

if result.Item != nil {
if user_config.Item != nil {
qsvc := sqs.New(sess)

m := SqsMessage{document.UserId, document.ID}
Expand Down
5 changes: 3 additions & 2 deletions lambda-handler/save-document-handler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,20 @@ func handleRequest(ctx context.Context, event events.SQSEvent) {
log.Fatalf("Got error calling PutItem: %s", err)
}

result, err := svc.GetItem(&dynamodb.GetItemInput{
user_config, err := svc.GetItem(&dynamodb.GetItemInput{
TableName: aws.String("tnn-UserConfig"),
Key: map[string]*dynamodb.AttributeValue{
"id": {
S: aws.String(item.Body.Document.UserId),
},
},
})

if err != nil {
log.Fatalf("Got error calling GetItem: %s", err)
}

if result.Item != nil {
if user_config.Item != nil {
log.Printf("Recreating index for document %s", item.Body.Document.ID)
qsvc := sqs.New(sess)

Expand Down

0 comments on commit 68a6b46

Please sign in to comment.