mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-10 17:13:04 +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 (
|
||||
"bytes"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"image"
|
||||
"image/png"
|
||||
|
@ -268,7 +269,8 @@ func handleSubscriptionForm(c echo.Context) error {
|
|||
req.Status = models.SubscriberStatusEnabled
|
||||
req.ListUUIDs = pq.StringArray(req.SubListUUIDs)
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue