diff --git a/convex/thumbnails.ts b/convex/thumbnails.ts
index e272396..335fe77 100644
--- a/convex/thumbnails.ts
+++ b/convex/thumbnails.ts
@@ -18,7 +18,7 @@ export const createThumbnail = mutation({
throw new Error("you must be logged in to create a thumbnail");
}
- const isSubscribed = await isUserSubscribed(ctx);
+ // const isSubscribed = await isUserSubscribed(ctx);
const user = await getFullUser(ctx, userId);
@@ -26,13 +26,13 @@ export const createThumbnail = mutation({
throw new Error("no user with that id found");
}
- if (!isSubscribed && user.credits <= 0) {
- throw new Error("you must be subscribed to create a thumbnail");
- }
+ // if (!isSubscribed && user.credits <= 0) {
+ // throw new Error("you must be subscribed to create a thumbnail");
+ // }
- await ctx.db.patch(user._id, {
- credits: Math.max(0, user.credits - 1),
- });
+ // await ctx.db.patch(user._id, {
+ // credits: Math.max(0, user.credits - 1),
+ // });
return await ctx.db.insert("thumbnails", {
title: args.title,
diff --git a/convex/users.ts b/convex/users.ts
index 64350b6..c9b0fd7 100644
--- a/convex/users.ts
+++ b/convex/users.ts
@@ -36,15 +36,16 @@ export const getProfile = query({
});
export const isUserSubscribed = async (ctx: QueryCtx | MutationCtx) => {
- const userId = await getUserId(ctx);
+ return true;
+ // const userId = await getUserId(ctx);
- if (!userId) {
- return false;
- }
+ // if (!userId) {
+ // return false;
+ // }
- const userToCheck = await getFullUser(ctx, userId);
+ // const userToCheck = await getFullUser(ctx, userId);
- return (userToCheck?.endsOn ?? 0) > Date.now();
+ // return (userToCheck?.endsOn ?? 0) > Date.now();
};
export const createUser = internalMutation({
diff --git a/src/app/header.tsx b/src/app/header.tsx
index ca49fb2..d2b164e 100644
--- a/src/app/header.tsx
+++ b/src/app/header.tsx
@@ -55,7 +55,7 @@ export function Header() {
<>
{isAuthenticated && (
<>
- {!isSubscriped && }
+ {/* {!isSubscriped && } */}
>
)}