simplify usage of auth.Validate (#557)

This commit is contained in:
Alessandro Ros
2024-05-03 22:42:50 +02:00
committed by GitHub
parent 1d60608b6b
commit 3f62e11795
6 changed files with 36 additions and 30 deletions

View File

@@ -1041,7 +1041,7 @@ func TestServerAuth(t *testing.T) {
s := &Server{
Handler: &testServerHandler{
onAnnounce: func(ctx *ServerHandlerOnAnnounceCtx) (*base.Response, error) {
err2 := auth.Validate(ctx.Request, "myuser", "mypass", nil, nil, "IPCAM", nonce)
err2 := auth.Validate(ctx.Request, "myuser", "mypass", nil, "IPCAM", nonce)
if err2 != nil {
return &base.Response{ //nolint:nilerr
StatusCode: base.StatusUnauthorized,