feat: marca Uriel Jareth Consulting, API segura para agentes, aprobacion humana y webhooks HMAC

This commit is contained in:
urieljareth
2026-11-25 00:55:18 -06:00
parent 75180b0fe4
commit 0d4f19f35d
111 changed files with 7167 additions and 1272 deletions
+19 -5
View File
@@ -1,5 +1,8 @@
import { prisma } from "./db";
export const DEFAULT_COLOR_PRIMARIO = "#0400C4";
export const DEFAULT_COLOR_SECUNDARIO = "#0F172A";
export async function getConfigBranding() {
try {
const configs = await prisma.configuracion.findMany({
@@ -8,13 +11,24 @@ export async function getConfigBranding() {
const map: Record<string, string> = {};
for (const c of configs) map[c.clave] = c.valor;
return {
colorPrimario: map.color_primario || undefined,
colorSecundario: map.color_secundario || undefined,
logoBase64: map.logo_base64 ? (map.logo_base64.includes(":") ? map.logo_base64.split(":").slice(1).join(":") : map.logo_base64) : undefined,
logoMime: map.logo_base64 ? (map.logo_base64.includes(":") ? map.logo_base64.split(":")[0] : "image/png") : undefined,
colorPrimario: map.color_primario || DEFAULT_COLOR_PRIMARIO,
colorSecundario: map.color_secundario || DEFAULT_COLOR_SECUNDARIO,
logoBase64: map.logo_base64
? map.logo_base64.includes(":")
? map.logo_base64.split(":").slice(1).join(":")
: map.logo_base64
: undefined,
logoMime: map.logo_base64
? map.logo_base64.includes(":")
? map.logo_base64.split(":")[0]
: "image/png"
: undefined,
};
} catch {
return {};
return {
colorPrimario: DEFAULT_COLOR_PRIMARIO,
colorSecundario: DEFAULT_COLOR_SECUNDARIO,
};
}
}