add new key works

This commit is contained in:
Jan Prochazka
2022-03-24 17:58:54 +01:00
parent 38dfad4dfc
commit 1aecda6d9f
3 changed files with 46 additions and 10 deletions

View File

@@ -238,6 +238,16 @@ registerCommand({
conid: connection._id,
database,
driver,
onConfirm: async item => {
const type = driver.supportedKeyTypes.find(x => x.name == item.type);
await apiCall('database-connections/call-method', {
conid: connection._id,
database,
method: type.addMethod,
args: [item.keyName, ...type.dbKeyFields.map(fld => item[fld.name])],
});
},
});
},
});