no message

master
zcy 2022-04-01 03:42:00 +08:00
parent 0cf185ca82
commit 3f3df0d034
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ __debug_bin
test/pem/ca.pem test/pem/ca.pem
test/pem/client-cert.pem test/pem/client-cert.pem
test/pem/client-key.pem test/pem/client-key.pem
id_rsa_117

View File

@ -104,7 +104,7 @@ func UpdateDoc(doc Doc) error {
logs.Error(e.Error()) logs.Error(e.Error())
return e 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")) doc.Title,doc.ID,strings.Replace(doc.Content, "'", "\\'", -1), time.Now().Format("2006-01-02 15:04:05"))
_, er := db.GetMysqlClient().Query(sql) _, er := db.GetMysqlClient().Query(sql)
if nil != er { if nil != er {