Clean up models (#3228)

This commit is contained in:
qwerty287
2024-01-22 07:56:18 +01:00
committed by GitHub
parent a19c488a99
commit 5e2f7d81b3
27 changed files with 101 additions and 98 deletions

View File

@@ -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)