From 5e9b3f650de153e5f10146794a4ee6fd19bc92a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Snorre=20Magnus=20Dav=C3=B8en?= Date: Sat, 30 Sep 2023 18:09:48 +0200 Subject: [PATCH] chore: Only return post field in JSON MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Snorre Magnus Davøen --- models/models.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/models.go b/models/models.go index 76ab7e9..bc0d0b2 100644 --- a/models/models.go +++ b/models/models.go @@ -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