Normalize FirmaEC signature style values

This commit is contained in:
2026-05-21 22:34:16 -05:00
parent 8308e3537e
commit dfcc0ca37b
9 changed files with 17 additions and 10 deletions
+5 -1
View File
@@ -2,10 +2,14 @@
## Versión actual
- Versión base: `1.2.18`
- Versión base: `1.2.19`
## Historial
### 1.2.19 - 2026-05-21
- Backend normaliza estilos de firma antes de validar, aceptando variantes de texto y evitando fallos intermitentes al guardar `FirmaEC`.
### 1.2.18 - 2026-05-21
- Backend vuelve tolerante el guardado de preferencias de firma para aceptar clientes parciales o legados y evitar errores al guardar `FirmaEC`.
+1 -1
View File
@@ -2,7 +2,7 @@
## Versión actual
- Base actual: `1.2.18`
- Base actual: `1.2.19`
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
+1 -1
View File
@@ -2,7 +2,7 @@
## Versión actual
- Base actual: `1.2.18`
- Base actual: `1.2.19`
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
+1 -1
View File
@@ -2,7 +2,7 @@
## Versión actual
- Base actual: `1.2.18`
- Base actual: `1.2.19`
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
+1 -1
View File
@@ -1 +1 @@
1.2.18
1.2.19
+2 -2
View File
@@ -18,8 +18,8 @@ android {
applicationId "net.linkedcorp.linkedsign"
minSdk 26
targetSdk 35
versionCode 10218
versionName "1.2.18"
versionCode 10219
versionName "1.2.19"
buildConfigField "String", "API_BASE_URL", "\"${apiBaseUrl}\""
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "linkedsign-backend",
"version": "1.2.18",
"version": "1.2.19",
"private": true,
"description": "Initial backend for LinkedSign",
"main": "src/server.js",
+4 -1
View File
@@ -6,6 +6,8 @@ const ALLOWED_QR_BACKGROUNDS = ['transparent', 'soft'];
const ALLOWED_QR_BORDERS = ['none', 'line'];
const LEGACY_SIGNATURE_STYLE_MAP = {
image: 'qr',
firmaecuador: 'firmaec',
'firma ec': 'firmaec',
};
const getSignaturePreferences = async (userId) => {
@@ -13,7 +15,8 @@ const getSignaturePreferences = async (userId) => {
};
const updateSignaturePreferences = async (userId, { signatureStyle, qrPosition, qrBackground, qrBorder, signatureImageBase64 }) => {
const normalizedSignatureStyle = LEGACY_SIGNATURE_STYLE_MAP[String(signatureStyle || '').toLowerCase()] || signatureStyle;
const rawSignatureStyle = String(signatureStyle || '').trim().toLowerCase();
const normalizedSignatureStyle = LEGACY_SIGNATURE_STYLE_MAP[rawSignatureStyle] || rawSignatureStyle || 'qr';
if (!ALLOWED_SIGNATURE_STYLES.includes(normalizedSignatureStyle)) {
const error = new Error('Invalid signature style.');
error.statusCode = 400;
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
"version": "1.2.18",
"version": "1.2.19",
"type": "module",
"scripts": {
"dev": "vite",