feat: app install flow followup (#15193)
Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Omar López <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
57 files changed
+1471
-1224
No files matched your search
@@ -11,6 +11,7 @@ export async function getHandler(req: NextApiRequest) {
|
||||
const session = checkSession(req);
|
||||
const slug = appConfig.slug;
|
||||
const appType = appConfig.type;
|
||||
const returnTo = req.query?.returnTo;
|
||||
|
||||
await checkInstalled(slug, session.user.id);
|
||||
await createDefaultInstallation({
|
||||
@@ -20,7 +21,7 @@ export async function getHandler(req: NextApiRequest) {
|
||||
key: {},
|
||||
});
|
||||
|
||||
return { url: getInstalledAppPath({ variant: appConfig.variant, slug: "ping" }) };
|
||||
return { url: returnTo ?? getInstalledAppPath({ variant: appConfig.variant, slug: "ping" }) };
|
||||
}
|
||||
|
||||
export default defaultResponder(getHandler);
|
||||
Reference in new issue
Block a user