Add mailPassword table
This table stores email credentials for users using apps which use the email addon
This commit is contained in:
@@ -903,13 +903,14 @@ async function del(id) {
|
||||
{ query: 'DELETE FROM appPortBindings WHERE appId = ?', args: [ id ] },
|
||||
{ query: 'DELETE FROM appEnvVars WHERE appId = ?', args: [ id ] },
|
||||
{ query: 'DELETE FROM appPasswords WHERE identifier = ?', args: [ id ] },
|
||||
{ query: 'DELETE FROM mailPasswords WHERE appId = ?', args: [ id ] },
|
||||
{ query: 'DELETE FROM appMounts WHERE appId = ?', args: [ id ] },
|
||||
{ query: `UPDATE backupSites SET contentsJson = JSON_REMOVE(contentsJson, JSON_UNQUOTE(JSON_SEARCH(contentsJson, 'one', ?, NULL, '$.*[*]'))) WHERE contentsJson LIKE ${mysql.escape('%"' + id + '"%')}`, args: [ id ] },
|
||||
{ query: 'DELETE FROM apps WHERE id = ?', args: [ id ] }
|
||||
];
|
||||
|
||||
const results = await database.transaction(queries);
|
||||
if (results[6].affectedRows !== 1) throw new BoxError(BoxError.NOT_FOUND, 'App not found');
|
||||
if (results[7].affectedRows !== 1) throw new BoxError(BoxError.NOT_FOUND, 'App not found');
|
||||
}
|
||||
|
||||
async function clear() {
|
||||
|
||||
Reference in New Issue
Block a user