mirror of
https://github.com/knadh/listmonk.git
synced 2024-12-26 00:42:58 +08:00
Reject query-by-delete API requests with no query. Ref #2122.
This commit is contained in:
parent
d8a394d0f4
commit
ac5e10158a
1 changed files with 4 additions and 0 deletions
|
@ -439,6 +439,10 @@ func handleDeleteSubscribersByQuery(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.DeleteSubscribersByQuery(req.Query, req.ListIDs, req.SubscriptionStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue