aboutsummaryrefslogtreecommitdiff
path: root/route/routes/news.go
diff options
context:
space:
mode:
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 {