From 3bb8e9c9d3978e3baaaeb23b6639e24e1c688b8b Mon Sep 17 00:00:00 2001 From: Adam French Date: Wed, 10 Dec 2025 05:12:45 +0000 Subject: [PATCH] bugfix --- backend/models/post.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/models/post.go b/backend/models/post.go index 6dbb763..3397ecd 100644 --- a/backend/models/post.go +++ b/backend/models/post.go @@ -6,6 +6,6 @@ type Post struct { gorm.Model // includes ID, CreatedAt, UpdatedAt, DeletedAt Title string `gorm:"not null" json:"title"` AuthorID uint `json:"-"` - Author User `gorm:"foreignKey:AuthorID;->" json:"author"` + Author User `gorm:"foreignKey:AuthorID;references:ID" json:"author"` Content string `json:"content"` }