usersDbPreWrite function
Implementation
Future<Map<String, dynamic>> usersDbPreWrite(
dynamic data,
Map<String, dynamic> editorConfig,
String action,
Map<String, dynamic> params,
BuildContext? context,
) async {
Map<String, dynamic> result = genericFuncArrayDefaultValue(data);
// Avoid passing an empty password to the backend
if (data['passcode'].trim() == '') {
result['fieldsToDelete'].add('passcode');
}
// Avoid passing the repeat password field to the backend
result['fieldsToDelete'].add('passcode_repeat');
return result;
}