package general

import (
	"git.ma-al.com/goc_daniel/b2b/app/config"
	"github.com/gofiber/fiber/v3"
)

func InitHealth(app *fiber.App, cfg *config.Config) {
	// Health check endpoint
	app.Get("/health", func(c fiber.Ctx) error {
		// emailService.NewEmailService().SendVerificationEmail("goc_daniel@ma-al.com", "jakis_token", c.BaseURL(), "en")
		// emailService.NewEmailService().SendPasswordResetEmail("goc_daniel@ma-al.com", "jakis_token", c.BaseURL(), "en")
		// emailService.NewEmailService().SendNewUserAdminNotification("goc_daniel@ma-al.com", "admin", c.BaseURL())
		return c.JSON(fiber.Map{
			"status":  "ok",
			"app":     cfg.App.Name,
			"version": cfg.App.Version,
		})
	})
}
