🐛 Accidential overwrite of app secrets

This commit is contained in:
Manuel Ruwe
2023-01-03 20:36:58 +01:00
parent fd9467ef1f
commit 831e671956

View File

@@ -45,13 +45,21 @@ function Put(req: NextApiRequest, res: NextApiResponse) {
(previousProperty) => previousProperty.field === property.field
);
if (property.value !== undefined && property.value !== null) {
Consola.info(
'Detected credential change of private secret. Value will be overwritten in configuration'
);
return {
field: property.field,
type: property.type,
value: property.value,
};
}
return {
field: property.field,
type: property.type,
value:
property.value !== undefined || property.value === null
? property.value
: previousProperty?.value,
value: previousProperty?.value,
};
}),
},