Skip to content

Commit

Permalink
added count ot get endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
vsrc committed Oct 25, 2017
1 parent e97d61d commit 2521593
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,5 +277,12 @@ func Get(c *gin.Context) {
return true
})

c.JSON(200, rec)
// total := col.ApproxDocCount()

res := map[string]interface{}{
"total_count": i,
"data": rec,
}

c.JSON(200, res)
}

0 comments on commit 2521593

Please sign in to comment.