From 130797fc04e0d322b1348d6796e39c4bfc17e744 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 5 Jun 2022 08:11:00 -0700 Subject: small index style changes --- route/routes/news.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'route/routes') diff --git a/route/routes/news.go b/route/routes/news.go index 9d8df66..6917e4b 100644 --- a/route/routes/news.go +++ b/route/routes/news.go @@ -82,6 +82,10 @@ func NewsGetAll(ctx *fiber.Ctx) error { return util.MakeError(err, "NewsGetAll") } + if len(data.NewsItems) == 0 { + return ctx.Redirect("/", http.StatusSeeOther) + } + data.Meta.Description = data.PreferredUsername + " is a federated image board based on ActivityPub. The current version of the code running on the server is still a work-in-progress product, expect a bumpy ride for the time being. Get the server code here: https://git.fchannel.org." data.Meta.Url = data.Board.Actor.Id data.Meta.Title = data.Title -- cgit v1.2.3