up
This commit is contained in:
@@ -373,13 +373,9 @@ func LandingGetAiConfig(c *fiber.Ctx) error {
|
||||
if !landingSecret(c) {
|
||||
return c.Status(fiber.StatusUnauthorized).JSON(fiber.Map{"error": "no autorizado"})
|
||||
}
|
||||
config, err := models.GetActiveAiConfig("qwen")
|
||||
config, err := models.GetAiConfigForService("landing")
|
||||
if err != nil {
|
||||
// Intentar cualquier provider activo como fallback
|
||||
config, err = models.GetActiveAiConfig("")
|
||||
if err != nil {
|
||||
return c.Status(fiber.StatusNotFound).JSON(fiber.Map{"error": "no hay configuración de IA activa"})
|
||||
}
|
||||
return c.Status(fiber.StatusNotFound).JSON(fiber.Map{"error": "no hay configuración de IA activa"})
|
||||
}
|
||||
return c.JSON(fiber.Map{
|
||||
"provider": config.Provider,
|
||||
|
||||
Reference in New Issue
Block a user