feat: trim white space

This commit is contained in:
Simon Ding
2024-09-23 22:44:15 +08:00
parent 40c6e2df5c
commit f4ccc69b50
5 changed files with 48 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import (
"polaris/log"
"polaris/pkg/storage"
"polaris/pkg/utils"
"strconv"
"github.com/gin-gonic/gin"
@@ -22,6 +23,7 @@ func (s *Server) AddStorage(c *gin.Context) (interface{}, error) {
if err := c.ShouldBindJSON(&in); err != nil {
return nil, errors.Wrap(err, "bind json")
}
utils.TrimFields(&in)
if in.Implementation == "webdav" {
//test webdav