diff options
author | FChannel <> | 2022-06-05 08:11:00 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 130797fc04e0d322b1348d6796e39c4bfc17e744 (patch) | |
tree | dc74c6b762a7b1878e1e35bb91cd96e4b1423432 /route/routes | |
parent | a87235f8b978126c0ca9f9eb252f58e6de17622c (diff) |
small index style changes
Diffstat (limited to 'route/routes')
-rw-r--r-- | route/routes/news.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 |