🐛 Accidential overwrite of app secrets
This commit is contained in:
@@ -45,13 +45,21 @@ function Put(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
(previousProperty) => previousProperty.field === property.field
|
(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 {
|
return {
|
||||||
field: property.field,
|
field: property.field,
|
||||||
type: property.type,
|
type: property.type,
|
||||||
value:
|
value: previousProperty?.value,
|
||||||
property.value !== undefined || property.value === null
|
|
||||||
? property.value
|
|
||||||
: previousProperty?.value,
|
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user