Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
make history exist only behind auth
Browse files Browse the repository at this point in the history
  • Loading branch information
meeDamian committed Jan 11, 2019
1 parent ad1dd7f commit 0f5317d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ func btcStatus(c *gin.Context) {
c.JSON(408, "expired")
}

// TODO: pagination
// TODO: only paid
func history(c *gin.Context) {
history, err := lnClient.History()
if err != nil {
Expand Down Expand Up @@ -345,7 +347,9 @@ func main() {
r.GET("/info", info)

// TODO: only behind auth
r.GET("/history", history)
if len(accounts) > 0 {
r.GET("/history", history)
}

err := router.Run(fmt.Sprintf(":%d", *port))
if err != nil {
Expand Down

0 comments on commit 0f5317d

Please sign in to comment.