mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 05:36:00 +00:00
support remove fields for mongo
This commit is contained in:
@@ -121,7 +121,13 @@
|
||||
const resp = await apiCall('database-connections/update-collection', {
|
||||
conid,
|
||||
database,
|
||||
changeSet,
|
||||
changeSet: {
|
||||
...changeSet,
|
||||
updates: changeSet.updates.map(update => ({
|
||||
...update,
|
||||
fields: _.mapValues(update.fields, (v, k) => (v === undefined ? { $undefined: true } : v)),
|
||||
})),
|
||||
},
|
||||
});
|
||||
const { errorMessage } = resp || {};
|
||||
if (errorMessage) {
|
||||
|
||||
Reference in New Issue
Block a user