code refactoring, fixed playlist downloads sorting

This commit is contained in:
2023-10-19 11:29:56 +02:00
parent 2d75030cbc
commit da4aaeac84
3 changed files with 16 additions and 7 deletions

View File

@@ -24,9 +24,12 @@ func Login(w http.ResponseWriter, r *http.Request) {
return
}
cfg := config.Instance().GetConfig()
var (
username = config.Instance().GetConfig().Username
password = config.Instance().GetConfig().Password
)
if cfg.Username != req.Username || cfg.Password != req.Password {
if username != req.Username || password != req.Password {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}