From 1720c0862597aceab68b3484c49454af6c6c7101 Mon Sep 17 00:00:00 2001 From: Yanislav Igonin Date: Wed, 6 Apr 2022 00:43:13 +0300 Subject: [PATCH] add routes --- main.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 0a7c92f..1272436 100644 --- a/main.go +++ b/main.go @@ -114,7 +114,19 @@ func main() { app := fiber.New() app.Get("/", func(c *fiber.Ctx) error { - return c.SendString("Hello, World!") + return c.SendString("get threads") + }) + app.Post("/", func(c *fiber.Ctx) error { + return c.SendString("create thread") + }) + app.Get("/:threadID", func(c *fiber.Ctx) error { + return c.SendString("get thread by id") + }) + app.Post("/threadID", func(c *fiber.Ctx) error { + return c.SendString("create post in thread") + }) + app.Get("/captcha/:captchaID", func(c *fiber.Ctx) error { + return c.SendString("get captcha by id") }) log.Println("app - online, port -", strconv.Itoa(config.App.Port))