diff --git a/controllers/blog.go b/controllers/blog.go index 5560a18..15e96f7 100644 --- a/controllers/blog.go +++ b/controllers/blog.go @@ -182,7 +182,7 @@ func GetBlogPostById(id string) *models.BlogPost { func GetCommentsByContent(content string, url string) *[]models.Comment { var comments []models.Comment - err := db.Model(&comments).Where("content like ? and associated_post like ?", "%"+content+"%", url).Scan(&comments).Error + err := db.Model(&comments).Where("content like ? and associated_post like ?", "%"+content[1:]+"%", url).Scan(&comments).Error if err != nil { return &[]models.Comment{} }