Skip to content

Commit

Permalink
chore: Only return post field in JSON
Browse files Browse the repository at this point in the history
Signed-off-by: Snorre Magnus Davøen <[email protected]>
  • Loading branch information
snorremd committed Sep 30, 2023
1 parent 3fe5d92 commit 5e9b3f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package models

// Post model with key fields from the post
type Post struct {
Id int64 `json:"id"`
Id int64 `json:"-"`
Uri string `json:"post"`
CreatedAt int64 `json:"createdAt"` // Unix timestamp
Text string `json:"text"` // We don't want to store the text in the database
Languages []string `json:"languages"`
CreatedAt int64 `json:"-"`
Text string `json:"-"`
Languages []string `json:"-"`
}

// CreateEvent fired when a new post is created
Expand Down

0 comments on commit 5e9b3f6

Please sign in to comment.