feat(httpapi): require Idempotency-Key on POST chat messages

This commit is contained in:
Голиков Maximillian Антон
2026-10-06 23:55:36 +03:00
parent 23b5cd0c3f
commit 1695fa0f2f
3 changed files with 58 additions and 12 deletions
+1 -2
View File
@@ -61,8 +61,7 @@ func main() {
userSvc := service.NewUserService(store.Users(), hasher)
sessionSvc := service.NewSessionService(store.Users(), sessionRepo, hasher, cfg.SessionTTL)
chatSvc := service.NewChatService(store.Chats(), store.Users())
messageSvc := service.NewMessageService(store.Messages(), store.Chats())
messageSvc := service.NewMessageService(store.Messages(), store.Chats(), cfg.IdempotencyTTL)
healthChecks := []handler.HealthCheck{
func(ctx context.Context) error { return pool.Ping(ctx) },
}