mirror of
https://github.com/knadh/listmonk.git
synced 2024-12-26 00:42:58 +08:00
Reject blocklist-by-query API requests with no query.
This commit is contained in:
parent
ac5e10158a
commit
1ac9ccbb8b
1 changed files with 4 additions and 0 deletions
|
@ -462,6 +462,10 @@ func handleBlocklistSubscribersByQuery(c echo.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if req.Query == "" {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, app.i18n.Ts("globals.messages.invalidFields", "name", "query"))
|
||||
}
|
||||
|
||||
if err := app.core.BlocklistSubscribersByQuery(req.Query, req.ListIDs, req.SubscriptionStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue