fix: app that dont require setup page (#11628)

* fix

* add new test
This commit is contained in:
alannnc authored and GitHub committed 2023-10-01 11:45:27 -03:00
1 parent caf1b4c5d7
commit 032435fbd4
3 files changed
+37 -2

No files matched your search

@@ -166,7 +166,8 @@ export const integrationsHandler = async ({ ctx, input }: IntegrationsOptions) =
};
// We need to know if app is payment type
let isSetupAlready = false;
// undefined it means that app don't require app/setup/page
let isSetupAlready = undefined;
if (credential && app.categories.includes("payment")) {
const paymentApp = (await appStore[app.dirName as keyof typeof appStore]()) as PaymentApp | null;
if (paymentApp && "lib" in paymentApp && paymentApp?.lib && "PaymentService" in paymentApp?.lib) {