mirror of
https://github.com/go-shiori/shiori.git
synced 2024-09-20 15:06:14 +08:00
Fix: update time doesn't recorded in database
This commit is contained in:
parent
ffa2497c5f
commit
e9d8f3ce12
|
@ -210,6 +210,7 @@ func updateBookmarks(indices []string, base model.Bookmark, offline, overwrite b
|
|||
}
|
||||
|
||||
bookmarks[i].Tags = newTags
|
||||
bookmarks[i].Modified = time.Now().UTC().Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
result, err := DB.UpdateBookmarks(bookmarks)
|
||||
|
|
|
@ -379,7 +379,7 @@ func (db *SQLiteDatabase) SearchBookmarks(orderLatest bool, keyword string, tags
|
|||
FROM bookmark ` + whereClause
|
||||
|
||||
if orderLatest {
|
||||
query += ` ORDER BY modified DESC`
|
||||
query += ` ORDER BY id DESC`
|
||||
}
|
||||
|
||||
bookmarks := []model.Bookmark{}
|
||||
|
@ -432,7 +432,7 @@ func (db *SQLiteDatabase) UpdateBookmarks(bookmarks []model.Bookmark) (result []
|
|||
// Prepare statement
|
||||
stmtUpdateBookmark, err := db.Preparex(`UPDATE bookmark SET
|
||||
url = ?, title = ?, image_url = ?, excerpt = ?, author = ?,
|
||||
min_read_time = ?, max_read_time = ? WHERE id = ?`)
|
||||
min_read_time = ?, max_read_time = ?, modified = ? WHERE id = ?`)
|
||||
checkError(err)
|
||||
|
||||
stmtUpdateBookmarkContent, err := db.Preparex(`UPDATE bookmark_content SET
|
||||
|
@ -461,6 +461,7 @@ func (db *SQLiteDatabase) UpdateBookmarks(bookmarks []model.Bookmark) (result []
|
|||
book.Author,
|
||||
book.MinReadTime,
|
||||
book.MaxReadTime,
|
||||
book.Modified,
|
||||
book.ID)
|
||||
|
||||
stmtUpdateBookmarkContent.MustExec(
|
||||
|
|
Loading…
Reference in a new issue