Make ParamInt generic (any int type)

This commit is contained in:
Deluan
2023-11-23 13:40:06 -05:00
parent f69c27d146
commit ecadcfb403
3 changed files with 26 additions and 40 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ func (api *Router) CreateBookmark(r *http.Request) (*responses.Subsonic, error)
}
comment := utils.ParamString(r, "comment")
position := utils.ParamInt64(r, "position", 0)
position := utils.ParamInt(r, "position", int64(0))
repo := api.ds.MediaFile(r.Context())
err = repo.AddBookmark(id, comment, position)
@@ -94,7 +94,7 @@ func (api *Router) SavePlayQueue(r *http.Request) (*responses.Subsonic, error) {
}
current := utils.ParamString(r, "current")
position := utils.ParamInt64(r, "position", 0)
position := utils.ParamInt(r, "position", int64(0))
user, _ := request.UserFrom(r.Context())
client, _ := request.ClientFrom(r.Context())