mirror of
https://code.dumpstack.io/tools/wi.git
synced 2025-06-24 21:14:14 +00:00
Implements follow link from history
This commit is contained in:
parent
159907723b
commit
fd1e14128e
3 changed files with 27 additions and 5 deletions
|
@ -109,3 +109,15 @@ func GetHistory(db *sql.DB) (history []HistoryItem, err error) {
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
func GetHistoryUrl(db *sql.DB, historyID int64) (url string, err error) {
|
||||
stmt, err := db.Prepare("SELECT `url` FROM `history` WHERE id=$1;")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
err = stmt.QueryRow(historyID).Scan(&url)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue