changed logs

This commit is contained in:
afeiszli
2021-08-09 12:43:09 -04:00
parent 1c521934ba
commit 382901b124
17 changed files with 82 additions and 126 deletions

View File

@@ -4,11 +4,9 @@ import (
"encoding/base64"
"encoding/json"
"errors"
"log"
"net/http"
"strings"
"time"
"github.com/go-playground/validator/v10"
"github.com/gorilla/mux"
"github.com/gravitl/netmaker/database"
@@ -181,7 +179,7 @@ func ValidateNetworkUpdate(network models.Network) error {
if err != nil {
for _, e := range err.(validator.ValidationErrors) {
log.Println(e)
functions.PrintUserLog("validator",e.Error(),1)
}
}
return err
@@ -517,7 +515,7 @@ func CreateAccessKey(accesskey models.AccessKey, network models.Network) (models
err = v.Struct(accesskey)
if err != nil {
for _, e := range err.(validator.ValidationErrors) {
log.Println(e)
functions.PrintUserLog("validator",e.Error(),1)
}
return models.AccessKey{}, err
}