improve profile
This commit is contained in:
@@ -35,6 +35,12 @@ function CelebrityProfile() {
|
||||
const handleFieldSave = async (fieldName, newValue) => {
|
||||
// Converte stringa vuota a null per il backend
|
||||
const valueToSend = newValue === '' ? null : newValue;
|
||||
|
||||
// Converti la stringa 'true'/'false' in un booleano per il campo specifico
|
||||
if (fieldName === 'boobs_are_natural') {
|
||||
valueToSend = newValue === 'true';
|
||||
}
|
||||
|
||||
const payload = { [fieldName]: valueToSend };
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user