1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00

Add unique index enclosures_user_entry_url_idx

This commit is contained in:
Frédéric Guillot 2023-06-24 11:03:26 -07:00
parent a2f15b3c36
commit b552c293ca
3 changed files with 71 additions and 63 deletions

View file

@ -12,10 +12,6 @@ import (
"miniflux.app/http/response/json"
)
type enclosurePositionSaveRequest struct {
Progression int64 `json:"progression"`
}
func (h *handler) saveEnclosureProgression(w http.ResponseWriter, r *http.Request) {
enclosureID := request.RouteInt64Param(r, "enclosureID")
enclosure, err := h.store.GetEnclosure(enclosureID)
@ -23,6 +19,16 @@ func (h *handler) saveEnclosureProgression(w http.ResponseWriter, r *http.Reques
json.ServerError(w, r, err)
return
}
if enclosure == nil {
json.NotFound(w, r)
return
}
type enclosurePositionSaveRequest struct {
Progression int64 `json:"progression"`
}
var postData enclosurePositionSaveRequest
body, err := io.ReadAll(r.Body)
if err != nil {