mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
feat: add API routes /v1/enclosures/{enclosureID}
This commit is contained in:
parent
89ff33ddd0
commit
810b351772
9 changed files with 291 additions and 33 deletions
18
internal/validator/enclosure.go
Normal file
18
internal/validator/enclosure.go
Normal file
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue