feat: private posts
All checks were successful
Release / publish (push) Successful in 2m41s

This commit is contained in:
2025-10-17 23:51:19 +02:00
parent 68574ad289
commit 893c49ec88
15 changed files with 154 additions and 15 deletions

View File

@@ -12,7 +12,9 @@ type Post struct {
TLDR string `json:"tldr"`
Content string `json:"content"`
Comments []Comment
UserID uint `gorm:"->;<-:create"`
UserID uint `gorm:"->;<-:create"`
Private bool `json:"private" gorm:"-"`
Secret *string `json:"secret,omitempty" gorm:"->;<-:create;unique"`
}
// Comment represents a comment on a post, including its ID, post association, content, and creator.