Fallback unknown signature styles when saving preferences
This commit is contained in:
+5
-1
@@ -2,10 +2,14 @@
|
||||
|
||||
## Versión actual
|
||||
|
||||
- Versión base: `1.2.19`
|
||||
- Versión base: `1.2.20`
|
||||
|
||||
## Historial
|
||||
|
||||
### 1.2.20 - 2026-05-21
|
||||
|
||||
- Backend deja de rechazar estilos visuales desconocidos al guardar preferencias y los normaliza hacia `FirmaEC` o `QR` según corresponda.
|
||||
|
||||
### 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
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
## Versión actual
|
||||
|
||||
- Base actual: `1.2.19`
|
||||
- Base actual: `1.2.20`
|
||||
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
|
||||
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
## Versión actual
|
||||
|
||||
- Base actual: `1.2.19`
|
||||
- Base actual: `1.2.20`
|
||||
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
|
||||
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
## Versión actual
|
||||
|
||||
- Base actual: `1.2.19`
|
||||
- Base actual: `1.2.20`
|
||||
- Fuente de verdad: [VERSION](/home/mgonzalez/desarrollo/react/linkedsign/VERSION)
|
||||
- Historial de cambios: [CHANGELOG.md](/home/mgonzalez/desarrollo/react/linkedsign/CHANGELOG.md)
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ android {
|
||||
applicationId "net.linkedcorp.linkedsign"
|
||||
minSdk 26
|
||||
targetSdk 35
|
||||
versionCode 10219
|
||||
versionName "1.2.19"
|
||||
versionCode 10220
|
||||
versionName "1.2.20"
|
||||
|
||||
buildConfigField "String", "API_BASE_URL", "\"${apiBaseUrl}\""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "linkedsign-backend",
|
||||
"version": "1.2.19",
|
||||
"version": "1.2.20",
|
||||
"private": true,
|
||||
"description": "Initial backend for LinkedSign",
|
||||
"main": "src/server.js",
|
||||
|
||||
@@ -16,11 +16,9 @@ const getSignaturePreferences = async (userId) => {
|
||||
|
||||
const updateSignaturePreferences = async (userId, { signatureStyle, qrPosition, qrBackground, qrBorder, signatureImageBase64 }) => {
|
||||
const rawSignatureStyle = String(signatureStyle || '').trim().toLowerCase();
|
||||
const normalizedSignatureStyle = LEGACY_SIGNATURE_STYLE_MAP[rawSignatureStyle] || rawSignatureStyle || 'qr';
|
||||
let normalizedSignatureStyle = LEGACY_SIGNATURE_STYLE_MAP[rawSignatureStyle] || rawSignatureStyle || 'qr';
|
||||
if (!ALLOWED_SIGNATURE_STYLES.includes(normalizedSignatureStyle)) {
|
||||
const error = new Error('Invalid signature style.');
|
||||
error.statusCode = 400;
|
||||
throw error;
|
||||
normalizedSignatureStyle = rawSignatureStyle.includes('firma') ? 'firmaec' : 'qr';
|
||||
}
|
||||
|
||||
// Preferences should be resilient to stale clients or partially populated forms.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"version": "1.2.19",
|
||||
"version": "1.2.20",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Reference in New Issue
Block a user