aboutsummaryrefslogtreecommitdiff
path: root/internal/validator/enclosure.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/validator/enclosure.go')
-rw-r--r--internal/validator/enclosure.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/validator/enclosure.go b/internal/validator/enclosure.go
new file mode 100644
index 00000000..b33ac22e
--- /dev/null
+++ b/internal/validator/enclosure.go
@@ -0,0 +1,18 @@
+// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+package validator
+
+import (
+ "fmt"
+
+ "miniflux.app/v2/internal/model"
+)
+
+func ValidateEnclosureUpdateRequest(request *model.EnclosureUpdateRequest) error {
+ if request.MediaProgression < 0 {
+ return fmt.Errorf(`media progression must an positive integer`)
+ }
+
+ return nil
+}