From c33bcd0202f35d6f2a44808141a0d0dfc9b2de5c Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Thu, 4 Jul 2019 15:50:48 +0200 Subject: [PATCH] Fix password validation to work with testing DB entries --- common/utilities.go | 1 + routes/user/userEndpoints.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/utilities.go b/common/utilities.go index 95bb040..06a8a79 100644 --- a/common/utilities.go +++ b/common/utilities.go @@ -72,6 +72,7 @@ func AuthenticateForTest(t *testing.T, router *gin.Engine, url string, method st success := body_data["success"].(bool) if !success { + fmt.Println("Authentication not successful: ", body_data["message"]) panic(-1) } diff --git a/routes/user/userEndpoints.go b/routes/user/userEndpoints.go index 04e3b30..d062940 100644 --- a/routes/user/userEndpoints.go +++ b/routes/user/userEndpoints.go @@ -19,7 +19,7 @@ const weekHours = time.Hour * 24 * 7 type loginRequest struct { Username string `form:"Username" validate:"required"` - Password string `form:"Password" validate:"required,min=8"` + Password string `form:"Password" validate:"required,min=6"` } type tokenClaims struct {