mirror of
https://github.com/navidrome/navidrome.git
synced 2025-05-09 06:41:06 +03:00
Log validation errors
This commit is contained in:
parent
2437eed586
commit
e3dab1392f
@ -27,6 +27,7 @@ func checkParameters(c ControllerInterface) {
|
||||
|
||||
for _, p := range requiredParameters {
|
||||
if c.GetString(p) == "" {
|
||||
beego.Warn("Missing required parameter:", p)
|
||||
abortRequest(c, responses.ERROR_MISSING_PARAMETER)
|
||||
}
|
||||
}
|
||||
@ -42,6 +43,7 @@ func authenticate(c ControllerInterface) {
|
||||
}
|
||||
}
|
||||
if user != beego.AppConfig.String("user") || pass != beego.AppConfig.String("password") {
|
||||
beego.Warn("Invalid login:", user)
|
||||
abortRequest(c, responses.ERROR_AUTHENTICATION_FAIL)
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ func TestAuthentication(t *testing.T) {
|
||||
_, w := Get("/rest/ping.view?u=deluan&p=enc:776f726470617373&c=test&v=1.0.0", "TestAuthentication")
|
||||
Convey("The status should be 'ok'", func() {
|
||||
v := responses.Subsonic{}
|
||||
println("------", w.Body.String())
|
||||
xml.Unmarshal(w.Body.Bytes(), &v)
|
||||
So(v.Status, ShouldEqual, "ok")
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user