forked from mtusi2026/mtusi2026lab2
feat(app) lab2 prepared for mr
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
package chats
|
||||
|
||||
import "github.com/gofiber/fiber/v3"
|
||||
import (
|
||||
"gitflic.ru/project/bulla-max/mtusi2026lab2/internal/store"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
func RegisterRoutes(router fiber.Router) {
|
||||
router.Post("/chats", createChat)
|
||||
router.Get("/chats", listChats)
|
||||
router.Get("/chats/:chat_id", getChat)
|
||||
func RegisterRoutes(router fiber.Router, st *store.Store) {
|
||||
handler := NewHandler(st)
|
||||
router.Post("/chats", handler.CreateChat)
|
||||
router.Get("/chats", handler.ListChats)
|
||||
router.Get("/chats/:chat_id", handler.GetChat)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user