stub loadPages
This commit is contained in:
parent
05fe8b575b
commit
2a5a2f451e
10
news/news.go
10
news/news.go
|
@ -65,9 +65,17 @@ func addContainer(category_id int, flat, tree map[int]*NewsContainer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load and return in NewsContainer format all the unexported news items
|
||||||
|
func Unexported(db *sql.DB, offset, amount int) (map[int]*NewsContainer, int, error) {
|
||||||
|
categories.LoadCategories(db) // required by addContainer
|
||||||
|
|
||||||
|
rows, err := db.Query("SELECT url, title, category_id, timestamp, notes FROM news WHERE exported is null order by category_id ASC")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Load and return in NewsContainer format all the unexported news items
|
// Load and return in NewsContainer format all the unexported news items
|
||||||
func Unexported(db *sql.DB) (map[int]*NewsContainer, int, error) {
|
func Unexported(db *sql.DB) (map[int]*NewsContainer, int, error) {
|
||||||
categories.LoadCategories(db)
|
categories.LoadCategories(db) // required by addContainer
|
||||||
|
|
||||||
rows, err := db.Query("SELECT url, title, category_id, timestamp, notes FROM news WHERE exported is null order by category_id ASC")
|
rows, err := db.Query("SELECT url, title, category_id, timestamp, notes FROM news WHERE exported is null order by category_id ASC")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue