File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,6 @@ func AddCert(c *gin.Context) {
110110 }
111111
112112 err := certModel .Insert ()
113-
114113 if err != nil {
115114 api .ErrHandler (c , err )
116115 return
@@ -124,7 +123,6 @@ func AddCert(c *gin.Context) {
124123 }
125124
126125 err = content .WriteFile ()
127-
128126 if err != nil {
129127 api .ErrHandler (c , err )
130128 return
@@ -180,7 +178,6 @@ func ModifyCert(c *gin.Context) {
180178 }
181179
182180 err = content .WriteFile ()
183-
184181 if err != nil {
185182 api .ErrHandler (c , err )
186183 return
Original file line number Diff line number Diff line change 66 "github.com/go-acme/lego/v4/certcrypto"
77 "github.com/go-acme/lego/v4/certificate"
88 "github.com/lib/pq"
9+ "gorm.io/gorm/clause"
910 "os"
1011)
1112
@@ -93,7 +94,8 @@ func GetAutoCertList() (c []*Cert) {
9394}
9495
9596func (c * Cert ) Updates (n * Cert ) error {
96- return db .Model (& Cert {}).Where ("id" , c .ID ).Updates (n ).Error
97+ return db .Model (c ).Clauses (clause.Returning {}).
98+ Where ("id" , c .ID ).Updates (n ).Error
9799}
98100
99101func (c * Cert ) Remove () error {
You can’t perform that action at this time.
0 commit comments