mirror of
https://github.com/writefreely/writefreely
synced 2024-11-14 05:07:07 +00:00
Fix date format in anonymous posts
This commit is contained in:
parent
c42439886c
commit
ae7e42e24e
1 changed files with 2 additions and 2 deletions
|
@ -1833,7 +1833,7 @@ func (db *datastore) GetAnonymousPosts(u *User, page int) (*[]PublicPost, error)
|
||||||
if page > 0 {
|
if page > 0 {
|
||||||
limitStr = fmt.Sprintf(" LIMIT %d, %d", start, pagePosts)
|
limitStr = fmt.Sprintf(" LIMIT %d, %d", start, pagePosts)
|
||||||
}
|
}
|
||||||
rows, err := db.Query("SELECT id, view_count, title, created, updated, content FROM posts WHERE owner_id = ? AND collection_id IS NULL ORDER BY created DESC"+limitStr, u.ID)
|
rows, err := db.Query("SELECT id, view_count, title, language, created, updated, content FROM posts WHERE owner_id = ? AND collection_id IS NULL ORDER BY created DESC"+limitStr, u.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed selecting from posts: %v", err)
|
log.Error("Failed selecting from posts: %v", err)
|
||||||
return nil, impart.HTTPError{http.StatusInternalServerError, "Couldn't retrieve user anonymous posts."}
|
return nil, impart.HTTPError{http.StatusInternalServerError, "Couldn't retrieve user anonymous posts."}
|
||||||
|
@ -1843,7 +1843,7 @@ func (db *datastore) GetAnonymousPosts(u *User, page int) (*[]PublicPost, error)
|
||||||
posts := []PublicPost{}
|
posts := []PublicPost{}
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
p := Post{}
|
p := Post{}
|
||||||
err = rows.Scan(&p.ID, &p.ViewCount, &p.Title, &p.Created, &p.Updated, &p.Content)
|
err = rows.Scan(&p.ID, &p.ViewCount, &p.Title, &p.Language, &p.Created, &p.Updated, &p.Content)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed scanning row: %v", err)
|
log.Error("Failed scanning row: %v", err)
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue