new collection refactor

This commit is contained in:
Jan Prochazka
2024-08-22 11:48:34 +02:00
parent 7ad8edcdae
commit ccb28783a2
6 changed files with 110 additions and 53 deletions

View File

@@ -93,17 +93,7 @@
const handleNewCollection = () => {
showModal(NewCollectionModal, {
driver,
onConfirm: async values => {
runOperationOnDatabase(
{ conid: connection._id, database: name },
{
type: 'createCollection',
collection: values,
}
);
// saveScriptToDatabase({ conid: connection._id, database: name }, `db.createCollection('${newCollection}')`);
},
dbid: { conid: connection._id, database: name },
});
};