diff --git a/example.api.server.toml b/example.api.server.toml index 67339f95f4a46a314c02dc29a073973743b48994..de41135b99d7c57c56ae68d56e60a3b72d87800a 100644 --- a/example.api.server.toml +++ b/example.api.server.toml @@ -16,7 +16,7 @@ url_prefix = "/api/" session_duration = 7200000000000 [mysql] -dsn = dsn = "username:password@tcp(localhost:3306)/dbname?&collation=utf8mb4_unicode_ci" +dsn = "username:password@tcp(localhost:3306)/dbname?&collation=utf8mb4_unicode_ci&parseTime=true" [security] jwt_secret = "" diff --git a/server/model/user.go b/server/model/user.go index 056d590ff75e95deede6a867e5584724bf303c59..911e9d382494efa1b5121503fdd4b6d7116a223a 100644 --- a/server/model/user.go +++ b/server/model/user.go @@ -25,7 +25,7 @@ type User struct { Username string `json:"username,omitempty" gorm:"Unique"` - Password string `json:"password,omitempty"` + Password string `json:"-"` } func GetUserByName(name string) (User, error) {