Skip to content

Commit

Permalink
fix: Create only one workspace after verification
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed May 9, 2024
1 parent a3b17b4 commit 2d85283
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -26,6 +26,14 @@ const handler = async (

if (!user) throw errors.notFound("user");

const userSettings = await userSettingsCollection.findOne({
userId: user._id
});

if (userSettings) {
return { redirect: "/" };
}

const redirect = await ctx.fastify.redis.get(`user:${user._id}:emailVerificationRedirect`);
const plan = await ctx.fastify.redis.get(`user:${user._id}:subscriptionPlan`);

Expand Down

0 comments on commit 2d85283

Please sign in to comment.