Replace all utils.Param* with req.Params

This commit is contained in:
Deluan
2023-12-21 17:41:09 -05:00
parent 00597e01e9
commit dfcc189cff
27 changed files with 269 additions and 513 deletions
+3 -2
View File
@@ -8,7 +8,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model/request"
"github.com/navidrome/navidrome/server/subsonic/responses"
"github.com/navidrome/navidrome/utils"
"github.com/navidrome/navidrome/utils/req"
)
func (api *Router) GetScanStatus(r *http.Request) (*responses.Subsonic, error) {
@@ -41,7 +41,8 @@ func (api *Router) StartScan(r *http.Request) (*responses.Subsonic, error) {
return nil, newError(responses.ErrorAuthorizationFail)
}
fullScan := utils.ParamBool(r, "fullScan", false)
p := req.Params(r)
fullScan := p.BoolOr("fullScan", false)
go func() {
start := time.Now()