From 3f3df0d034f001c4367dfb51db786e36245fbd9d Mon Sep 17 00:00:00 2001 From: zcy <290198252@qq.com> Date: Fri, 1 Apr 2022 03:42:00 +0800 Subject: [PATCH] no message --- .gitignore | 1 + model/blog.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 657e742..1304102 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ __debug_bin test/pem/ca.pem test/pem/client-cert.pem test/pem/client-key.pem +id_rsa_117 diff --git a/model/blog.go b/model/blog.go index 654b660..829fa8d 100644 --- a/model/blog.go +++ b/model/blog.go @@ -104,7 +104,7 @@ func UpdateDoc(doc Doc) error { logs.Error(e.Error()) return e } - sql = fmt.Sprintf(`insert into doc(title,doc_id,content,edit_time) values('%s',%d,'%s','%s');`, + sql = fmt.Sprintf(`insert into doc_history(title,doc_id,content,edit_time) values('%s',%d,'%s','%s');`, doc.Title,doc.ID,strings.Replace(doc.Content, "'", "\\'", -1), time.Now().Format("2006-01-02 15:04:05")) _, er := db.GetMysqlClient().Query(sql) if nil != er {