From 5ee6d0a7bb85d7f28fe4f838150c17ecb6a9d1b7 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 4 Jun 2022 15:34:45 -0700 Subject: last few routes marked TODO should be done with them this weekend and all things `should` be working for the fiber transition. still have to test federation locally --- route/routes/news.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'route/routes/news.go') diff --git a/route/routes/news.go b/route/routes/news.go index 0d226a5..14de52e 100644 --- a/route/routes/news.go +++ b/route/routes/news.go @@ -43,10 +43,10 @@ func NewsGet(ctx *fiber.Ctx) error { return ctx.Render("news", fiber.Map{"page": data}, "layouts/main") } -func AllNewsGet(ctx *fiber.Ctx) error { +func NewsGetAll(ctx *fiber.Ctx) error { actor, err := activitypub.GetActorFromDB(config.Domain) if err != nil { - return util.MakeError(err, "AllNewsGet") + return util.MakeError(err, "NewsGetAll") } var data route.PageData @@ -63,7 +63,7 @@ func AllNewsGet(ctx *fiber.Ctx) error { data.NewsItems, err = db.GetNews(0) if err != nil { - return util.MakeError(err, "AllNewsGet") + return util.MakeError(err, "NewsGetAll") } data.Themes = &config.Themes @@ -71,3 +71,13 @@ func AllNewsGet(ctx *fiber.Ctx) error { return ctx.Render("anews", fiber.Map{"page": data}, "layouts/main") } + +// TODO routes/NewsPost +func NewsPost(c *fiber.Ctx) error { + return c.SendString("admin post news") +} + +// TODO routes/NewsDelete +func NewsDelete(c *fiber.Ctx) error { + return c.SendString("admin news delete") +} -- cgit v1.2.3