feat(app) implemented lab 4

This commit is contained in:
imadev
2026-11-06 19:06:21 +03:00
parent 68968c4a3a
commit b4239f8cf0
63 changed files with 3944 additions and 137 deletions
+5 -4
View File
@@ -9,11 +9,12 @@ import (
)
type Handler struct {
store *store.Store
store *store.Store
jsonBodyLimit int64
}
func NewHandler(st *store.Store) *Handler {
return &Handler{store: st}
func NewHandler(st *store.Store, jsonBodyLimit int64) *Handler {
return &Handler{store: st, jsonBodyLimit: jsonBodyLimit}
}
type CreateChatRequest struct {
@@ -25,7 +26,7 @@ func (h *Handler) CreateChat(c fiber.Ctx) error {
userID := common.MustUserID(c)
var req CreateChatRequest
if err := common.BindJSON(c, &req); err != nil {
if err := common.BindJSON(c, &req, h.jsonBodyLimit); err != nil {
return err
}