feat: Introduce reset and verify connection mutations
This commit is contained in:
@@ -21,18 +21,6 @@ const updateConnectionResolver = async (params: Params, req: RequestWithCurrentU
|
||||
}
|
||||
})
|
||||
|
||||
// Not every updateConnection mutation can verify credentials as some need to reconnect
|
||||
try {
|
||||
const appClass = (await import(`../../apps/${connection.key}`)).default;
|
||||
|
||||
const appInstance = new appClass(connection.data)
|
||||
const verifiedCredentials = await appInstance.verifyCredentials();
|
||||
|
||||
connection = await connection.$query().patchAndFetch({
|
||||
data: verifiedCredentials
|
||||
})
|
||||
} catch {}
|
||||
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user