diff --git a/admin/src/lib/api.ts b/admin/src/lib/api.ts index 39b5708..ee945dc 100644 --- a/admin/src/lib/api.ts +++ b/admin/src/lib/api.ts @@ -24,7 +24,8 @@ async function request(path: string, options?: RequestInit): Promise { throw new ApiError(res.status, body.message || 'Error de servidor'); } - return res.json(); + const text = await res.text(); + return text ? JSON.parse(text) : ({} as T); } export const api = { diff --git a/backend/src/auth/email-otp.service.ts b/backend/src/auth/email-otp.service.ts index 0d07a8a..fc9861b 100644 --- a/backend/src/auth/email-otp.service.ts +++ b/backend/src/auth/email-otp.service.ts @@ -46,6 +46,7 @@ export class EmailOtpService { create: { key: 'smtp_config', value: config as any }, update: { value: config as any }, }); + return { message: 'Configuración SMTP guardada' }; } async sendOtp(email: string): Promise {