mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-16 01:19:02 +01:00
Clean up models (#3228)
This commit is contained in:
@@ -70,8 +70,6 @@ func PostRegistry(c *gin.Context) {
|
||||
Address: in.Address,
|
||||
Username: in.Username,
|
||||
Password: in.Password,
|
||||
Token: in.Token,
|
||||
Email: in.Email,
|
||||
}
|
||||
if err := registry.Validate(); err != nil {
|
||||
c.String(http.StatusBadRequest, "Error inserting registry. %s", err)
|
||||
@@ -119,12 +117,6 @@ func PatchRegistry(c *gin.Context) {
|
||||
if in.Password != "" {
|
||||
registry.Password = in.Password
|
||||
}
|
||||
if in.Token != "" {
|
||||
registry.Token = in.Token
|
||||
}
|
||||
if in.Email != "" {
|
||||
registry.Email = in.Email
|
||||
}
|
||||
|
||||
if err := registry.Validate(); err != nil {
|
||||
c.String(http.StatusUnprocessableEntity, "Error updating registry. %s", err)
|
||||
|
||||
Reference in New Issue
Block a user