Skip to content

Commit

Permalink
fix: query for home urls
Browse files Browse the repository at this point in the history
  • Loading branch information
puni9869 committed Nov 9, 2024
1 parent fc49186 commit 799c5dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/home/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func Home(c *gin.Context) {
currentlyLoggedIn := session.Get(middlewares.Userkey)
var urls []models.Url
db := database.Db()
result := db.Order("updated_at desc").Limit(100).Find(&urls)
result := db.Where(&models.Url{CreatedBy: currentlyLoggedIn.(string), IsActive: true, IsDeleted: false, IsArchived: false}).Order("updated_at desc").Limit(100).Find(&urls)
log.WithField("result", result.RowsAffected).Info("" + currentlyLoggedIn.(string))
c.HTML(http.StatusOK, "home.tmpl", gin.H{"HasError": false, "Urls": urls})
}
Expand Down

0 comments on commit 799c5dd

Please sign in to comment.