feat(app) lab2 prepared for mr

This commit is contained in:
imadev
2026-10-23 18:55:20 +03:00
parent 1db3953226
commit f6e74247fd
57 changed files with 2367 additions and 660 deletions
+9 -5
View File
@@ -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)
}