aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorknotteye <knotteye@airmail.cc>2021-07-02 07:43:54 -0500
committerknotteye <knotteye@airmail.cc>2021-07-02 07:43:54 -0500
commitd98441da108725a76d697e358d161c06783cb066 (patch)
tree4a32df3435407f15039eecf4b210d21f305a64ae /client.go
parent9180db359438a4d2833c2e094ebc870da37262ef (diff)
Display most recents news item and create a table for boards
Diffstat (limited to 'client.go')
-rw-r--r--client.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/client.go b/client.go
index 38f0d6f..074b645 100644
--- a/client.go
+++ b/client.go
@@ -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)