1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-16 18:01:37 +00:00

Validate Keep list and Block list rules syntax

This commit is contained in:
Frédéric Guillot 2021-02-07 18:38:45 -08:00 committed by fguillot
parent 05fd83bd6f
commit e8d0360e64
19 changed files with 173 additions and 23 deletions

View file

@ -58,10 +58,12 @@ func (h *handler) updateFeed(w http.ResponseWriter, r *http.Request) {
view.Set("defaultUserAgent", config.Opts.HTTPClientUserAgent())
feedModificationRequest := &model.FeedModificationRequest{
FeedURL: model.OptionalString(feedForm.FeedURL),
SiteURL: model.OptionalString(feedForm.SiteURL),
Title: model.OptionalString(feedForm.Title),
CategoryID: model.OptionalInt64(feedForm.CategoryID),
FeedURL: model.OptionalString(feedForm.FeedURL),
SiteURL: model.OptionalString(feedForm.SiteURL),
Title: model.OptionalString(feedForm.Title),
CategoryID: model.OptionalInt64(feedForm.CategoryID),
BlocklistRules: model.OptionalString(feedForm.BlocklistRules),
KeeplistRules: model.OptionalString(feedForm.KeeplistRules),
}
if validationErr := validator.ValidateFeedModification(h.store, loggedUser.ID, feedModificationRequest); validationErr != nil {