🐛 Bug fix
This commit is contained in:
		| @@ -1,9 +1,10 @@ | |||||||
| package api | package api | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"git.solsynth.dev/hypernet/reader/pkg/internal/services" |  | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
|  | 	"git.solsynth.dev/hypernet/reader/pkg/internal/services" | ||||||
|  |  | ||||||
| 	"git.solsynth.dev/hypernet/nexus/pkg/nex/sec" | 	"git.solsynth.dev/hypernet/nexus/pkg/nex/sec" | ||||||
| 	"git.solsynth.dev/hypernet/reader/pkg/internal/database" | 	"git.solsynth.dev/hypernet/reader/pkg/internal/database" | ||||||
| 	"git.solsynth.dev/hypernet/reader/pkg/internal/models" | 	"git.solsynth.dev/hypernet/reader/pkg/internal/models" | ||||||
| @@ -62,6 +63,8 @@ func listNewsArticles(c *fiber.Ctx) error { | |||||||
| 		sources = append(sources, srv.ID) | 		sources = append(sources, srv.ID) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	tx = tx.Where("source IN ?", sources) | ||||||
|  |  | ||||||
| 	var count int64 | 	var count int64 | ||||||
| 	countTx := tx | 	countTx := tx | ||||||
| 	if err := countTx.Model(&models.NewsArticle{}).Count(&count).Error; err != nil { | 	if err := countTx.Model(&models.NewsArticle{}).Count(&count).Error; err != nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user