Skip to content

Commit

Permalink
Test in bruno
Browse files Browse the repository at this point in the history
  • Loading branch information
lil5 committed Nov 3, 2023
1 parent 1ff6cba commit 84518f3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
11 changes: 11 additions & 0 deletions bruno/chain/get near.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: get near
type: http
seq: 9
}

get {
url:
body: none
auth: none
}
2 changes: 1 addition & 1 deletion server/internal/controllers/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func ChainGetNear(c *gin.Context) {
}

chains := []models.Chain{}
sql := "SELECT UID, Name, Genders FROM chains"
sql := "SELECT uid, name, genders FROM chains"
args := []any{}

sql = fmt.Sprintf("%s WHERE %s <= ? AND chains.published = TRUE", sql, sqlCalcDistance("chains.latitude", "chains.longitude", "?", "?"))
Expand Down
1 change: 0 additions & 1 deletion server/internal/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ func Routes() *gin.Engine {
v2.PATCH("/chain/approve-user", controllers.ChainApproveUser)
v2.DELETE("/chain/unapproved-user", controllers.ChainDeleteUnapproved)
v2.POST("/chain/poke", controllers.Poke)

v2.GET("/chain/near", controllers.ChainGetNear)

// bag
Expand Down

0 comments on commit 84518f3

Please sign in to comment.