Skip to content

Commit

Permalink
Merge pull request #16 from NetSepio/vaibhavvvvv/dev
Browse files Browse the repository at this point in the history
Nodes: fix api to get all active nodes
  • Loading branch information
vaibhavvvvv authored Jun 9, 2024
2 parents 865ef1f + 28031bd commit 63e1bd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v1/nodes/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func FetchAllNodes(c *gin.Context) {
func FetchAllActiveNodes(c *gin.Context) {
db := dbconfig.GetDb()
var nodes *[]models.Node
if err := db.Select(&nodes).Where("status = ? ", "active").Error; err != nil {
if err := db.Find(&nodes).Where("status = ? ", "active").Error; err != nil {
logwrapper.Errorf("failed to get active nodes from DB: %s", err)
httpo.NewErrorResponse(http.StatusInternalServerError, err.Error()).SendD(c)
return
Expand Down

0 comments on commit 63e1bd1

Please sign in to comment.