mirror of
https://github.com/yanislav-igonin/micrach
synced 2025-04-20 03:40:33 +03:00
add routes
This commit is contained in:
parent
c132512059
commit
1720c08625
14
main.go
14
main.go
@ -114,7 +114,19 @@ func main() {
|
|||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
|
|
||||||
app.Get("/", func(c *fiber.Ctx) error {
|
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))
|
log.Println("app - online, port -", strconv.Itoa(config.App.Port))
|
||||||
|
Loading…
Reference in New Issue
Block a user