Skip to content

Commit

Permalink
Merge pull request #127 from getAlby/default-request-methods
Browse files Browse the repository at this point in the history
Default to enable all request methods
  • Loading branch information
kiwiidb authored Aug 31, 2023
2 parents 7031614 + 033e4c8 commit 6b7be74
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions echo_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,13 @@ func (svc *Service) AppsNewHandler(c echo.Context) error {
disabled := c.QueryParam("editable") == "false"
requestMethods := c.QueryParam("request_methods")
if requestMethods == "" {
//pay_invoice checkbox is default checked but can be disabled
requestMethods = NIP_47_PAY_INVOICE_METHOD
// if no request methods are given, enable them all by default
keys := []string{}
for key := range nip47MethodDescriptions {
keys = append(keys, key)
}

requestMethods = strings.Join(keys, " ")
}
budgetEnabled := maxAmount != "" || budgetRenewal != ""
csrf, _ := c.Get(middleware.DefaultCSRFConfig.ContextKey).(string)
Expand Down

0 comments on commit 6b7be74

Please sign in to comment.