refactor: Pass connection, flow and step as params to apps

This commit is contained in:
Faruk AYDIN
2022-08-21 20:25:04 +03:00
parent cd6c5216ff
commit 44e3de8534
18 changed files with 60 additions and 85 deletions

View File

@@ -1,5 +1,4 @@
import Context from '../../types/express/context';
import App from '../../models/app';
type Params = {
id: string;
@@ -19,9 +18,8 @@ const testConnection = async (
.throwIfNotFound();
const appClass = (await import(`../../apps/${connection.key}`)).default;
const appData = App.findOneByKey(connection.key);
const appInstance = new appClass(connection);
const appInstance = new appClass(appData, connection.formattedData);
const isStillVerified =
await appInstance.authenticationClient.isStillVerified();