chore: Use get app helper to get application data

This commit is contained in:
Faruk AYDIN
2022-10-06 15:49:05 +03:00
parent a58a59788d
commit 0825eb36e4
52 changed files with 139 additions and 1761 deletions

View File

@@ -27,7 +27,7 @@ const createAuthData = async (
const authInstance = (await import(`../../apps/${connection.key}2/auth`))
.default;
const app = App.findOneByKey(connection.key);
const app = await App.findOneByKey(connection.key);
const $ = globalVariable(connection, app);
await authInstance.createAuthData($);

View File

@@ -13,7 +13,7 @@ const createConnection = async (
params: Params,
context: Context
) => {
App.findOneByKey(params.input.key);
await App.findOneByKey(params.input.key);
return await context.currentUser.$relatedQuery('connections').insert({
key: params.input.key,

View File

@@ -20,7 +20,7 @@ const verifyConnection = async (
})
.throwIfNotFound();
const app = App.findOneByKey(connection.key);
const app = await App.findOneByKey(connection.key);
const authInstance = (await import(`../../apps/${connection.key}2/auth`))
.default;