aboutsummaryrefslogtreecommitdiff
path: root/route/routes/news.go
diff options
context:
space:
mode:
authorFChannel <>2022-06-05 08:47:45 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit8b1a7fa5e37e4c8c4b0df3d83067079a081e32d3 (patch)
tree122d0a2ad47233cc963cc39c841aa546759b103d /route/routes/news.go
parent130797fc04e0d322b1348d6796e39c4bfc17e744 (diff)
blacklist route working
Diffstat (limited to 'route/routes/news.go')
-rw-r--r--route/routes/news.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/route/routes/news.go b/route/routes/news.go
index 6917e4b..8e8047a 100644
--- a/route/routes/news.go
+++ b/route/routes/news.go
@@ -19,8 +19,7 @@ func NewsGet(ctx *fiber.Ctx) error {
ts, err := strconv.Atoi(timestamp)
if err != nil {
- ctx.Status(http.StatusForbidden)
- return ctx.Render("404", fiber.Map{})
+ return ctx.Status(404).Render("404", fiber.Map{})
}
actor, err := activitypub.GetActorFromDB(config.Domain)
@@ -131,8 +130,7 @@ func NewsDelete(ctx *fiber.Ctx) error {
tsint, err := strconv.Atoi(timestamp)
if err != nil {
- ctx.Status(http.StatusForbidden)
- return ctx.Render("404", fiber.Map{})
+ return ctx.Status(404).Render("404", fiber.Map{})
}
if err := db.DeleteNewsItem(tsint); err != nil {