mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-14 11:36:51 +08:00
Fix JSON error on HTML form subscription
This commit is contained in:
parent
9d3ca357f6
commit
69d3e9b9c8
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"image"
|
"image"
|
||||||
"image/png"
|
"image/png"
|
||||||
|
@ -268,7 +269,8 @@ func handleSubscriptionForm(c echo.Context) error {
|
||||||
req.Status = models.SubscriberStatusEnabled
|
req.Status = models.SubscriberStatusEnabled
|
||||||
req.ListUUIDs = pq.StringArray(req.SubListUUIDs)
|
req.ListUUIDs = pq.StringArray(req.SubListUUIDs)
|
||||||
if _, err := insertSubscriber(req.SubReq, app); err != nil {
|
if _, err := insertSubscriber(req.SubReq, app); err != nil {
|
||||||
return err
|
return c.Render(http.StatusInternalServerError, tplMessage,
|
||||||
|
makeMsgTpl("Error", "", fmt.Sprintf("%s", err.(*echo.HTTPError).Message)))
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.Render(http.StatusInternalServerError, tplMessage,
|
return c.Render(http.StatusInternalServerError, tplMessage,
|
||||||
|
|
Loading…
Reference in a new issue