Compare commits
1 Commits
43a2b4e9d5
...
0bcd3aae15
Author | SHA1 | Date | |
---|---|---|---|
0bcd3aae15 |
@ -28,10 +28,16 @@ func Router(e *echo.Echo, ln lightning.Lightning) {
|
|||||||
|
|
||||||
func payRequest(c echo.Context) error {
|
func payRequest(c echo.Context) error {
|
||||||
name := c.Param("name")
|
name := c.Param("name")
|
||||||
|
|
||||||
|
callback, err := url.JoinPath(env.PublicUrl, "/.well-known/lnurlp/", name, "/pay")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return c.JSON(
|
return c.JSON(
|
||||||
http.StatusOK,
|
http.StatusOK,
|
||||||
map[string]any{
|
map[string]any{
|
||||||
"callback": fmt.Sprintf("%s/.well-known/lnurlp/%s/pay", env.PublicUrl, name),
|
"callback": callback,
|
||||||
"minSendable": MIN_SENDABLE_AMOUNT,
|
"minSendable": MIN_SENDABLE_AMOUNT,
|
||||||
"maxSendable": MAX_SENDABLE_AMOUNT,
|
"maxSendable": MAX_SENDABLE_AMOUNT,
|
||||||
"metadata": fmt.Sprintf("[[\"text/plain\",\"paying %s\"]]", name),
|
"metadata": fmt.Sprintf("[[\"text/plain\",\"paying %s\"]]", name),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user