refactor: use functional app implementation

This commit is contained in:
Ali BARIN
2022-10-06 23:27:37 +02:00
committed by Faruk AYDIN
parent 89d7359060
commit e7b47f5c98
9 changed files with 72 additions and 50 deletions

View File

@@ -21,11 +21,8 @@ const verifyConnection = async (
.throwIfNotFound();
const app = await App.findOneByKey(connection.key);
const authInstance = (await import(`../../apps/${connection.key}2/auth`))
.default;
const $ = globalVariable(connection, app);
await authInstance.verifyCredentials($);
const $ = await globalVariable(connection, app);
await app.auth.verifyCredentials($);
connection = await connection.$query().patchAndFetch({
verified: true,