diff options
author | knotteye <knotteye@airmail.cc> | 2021-07-02 07:43:54 -0500 |
---|---|---|
committer | knotteye <knotteye@airmail.cc> | 2021-07-02 07:43:54 -0500 |
commit | d98441da108725a76d697e358d161c06783cb066 (patch) | |
tree | 4a32df3435407f15039eecf4b210d21f305a64ae /client.go | |
parent | 9180db359438a4d2833c2e094ebc870da37262ef (diff) |
Display most recents news item and create a table for boards
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -49,6 +49,7 @@ type PageData struct { InstanceIndex []ObjectBase ReturnTo string NewsItems []NewsItem + BoardRemainer []int } type AdminPage struct { @@ -98,6 +99,7 @@ func IndexGet(w http.ResponseWriter, r *http.Request, db *sql.DB) { data.Board.Actor = actor data.Board.Post.Actor = actor.Id data.Board.Restricted = actor.Restricted + data.BoardRemainer = make([]int, (len(data.Boards) % 3)+1) data.InstanceIndex = GetCollectionFromReq("https://fchan.xyz/followers").Items data.NewsItems = getNewsFromDB(db) |