removed all free tier restrictions

This commit is contained in:
2026-01-29 15:20:42 +00:00
parent 232e00a2b0
commit 2aa13e34bf
21 changed files with 413 additions and 639 deletions

View File

@@ -2,11 +2,11 @@ import { IssueCreateRequestSchema } from "@sprint/shared";
import type { AuthedRequest } from "../../auth/middleware";
import {
createIssue,
FREE_TIER_LIMITS,
getOrganisationIssueCount,
// FREE_TIER_LIMITS,
// getOrganisationIssueCount,
getOrganisationMemberRole,
getProjectByID,
getUserById,
// getUserById,
} from "../../db/queries";
import { errorResponse, parseJsonBody } from "../../validation";
@@ -34,17 +34,17 @@ export default async function issueCreate(req: AuthedRequest) {
}
// check free tier limit
const user = await getUserById(req.userId);
if (user && user.plan !== "pro") {
const issueCount = await getOrganisationIssueCount(project.organisationId);
if (issueCount >= FREE_TIER_LIMITS.issuesPerOrganisation) {
return errorResponse(
`free tier is limited to ${FREE_TIER_LIMITS.issuesPerOrganisation} issues per organisation. upgrade to pro for unlimited issues.`,
"FREE_TIER_ISSUE_LIMIT",
403,
);
}
}
// const user = await getUserById(req.userId);
// if (user && user.plan !== "pro") {
// const issueCount = await getOrganisationIssueCount(project.organisationId);
// if (issueCount >= FREE_TIER_LIMITS.issuesPerOrganisation) {
// return errorResponse(
// `free tier is limited to ${FREE_TIER_LIMITS.issuesPerOrganisation} issues per organisation. upgrade to pro for unlimited issues.`,
// "FREE_TIER_ISSUE_LIMIT",
// 403,
// );
// }
// }
const issue = await createIssue(
project.id,