Skip to content

Commit

Permalink
Added post func
Browse files Browse the repository at this point in the history
  • Loading branch information
zarif007 committed Oct 24, 2022
1 parent f4f8afe commit 3c8f637
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Binary file modified Post/build/main
Binary file not shown.
Binary file modified Post/build/main.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions Post/pkg/post/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ var (
ErrorPostDoesNotExist = "PostPost does not exist"
)

type reaction struct {
Emoji string `json:"emoji"`
Reactors []string `json:"reactors"`
}

type Post struct {
Type string `json:"type"`
PostId string `json:"postId"`
Expand All @@ -32,6 +37,7 @@ type Post struct {
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Images []string `json:"images"`
Reactions []reaction `json:"reactions"`
}

func FetchPost(postId, tableName string, dynaClient dynamodbiface.DynamoDBAPI) (*Post, error) {
Expand Down

0 comments on commit 3c8f637

Please sign in to comment.