added a 404 to bad blog posts

This commit is contained in:
rawleyIfowler
2022-02-23 19:24:31 -06:00
parent 4f9fcdc898
commit 8e389c7a7f
5 changed files with 26 additions and 14 deletions

View File

@@ -26,5 +26,5 @@ type BlogPost struct {
Title string `json:"title" gorm:"unique"`
Date string `json:"date"`
Content string `json:"content"`
Comments []Comment `gorm:"foreignKey:Id"`
Comments []Comment `gorm:"foreignKey:AssociatedPost"`
}