diff options
| author | Kush Thaker <[email protected]> | 2024-08-05 21:25:11 +0530 |
|---|---|---|
| committer | Kush Thaker <[email protected]> | 2024-08-05 21:25:11 +0530 |
| commit | e4fd7f5aacc3c9f7f000e1858248d49aa4d3410e (patch) | |
| tree | 4f1af30951860629ef376c37bc995a65dda8b813 /apps/web/app/api | |
| parent | db schema in packages (diff) | |
| download | archived-supermemory-e4fd7f5aacc3c9f7f000e1858248d49aa4d3410e.tar.xz archived-supermemory-e4fd7f5aacc3c9f7f000e1858248d49aa4d3410e.zip | |
move limit to backend and thread service binding
Diffstat (limited to 'apps/web/app/api')
| -rw-r--r-- | apps/web/app/api/store/helper.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/web/app/api/store/helper.ts b/apps/web/app/api/store/helper.ts index 2dc42125..6ab7fb23 100644 --- a/apps/web/app/api/store/helper.ts +++ b/apps/web/app/api/store/helper.ts @@ -2,21 +2,21 @@ import { z } from "zod"; import { db } from "@/server/db"; import { contentToSpace, space, storedContent } from "@repo/db/schema"; import { and, eq, inArray } from "drizzle-orm"; -import { LIMITS } from "@/lib/constants"; -import { limit } from "@/app/actions/doers"; +// import { LIMITS } from "@repo/shared-types"; +// import { limit } from "@/app/actions/doers"; import { type AddFromAPIType } from "@repo/shared-types"; export const createMemoryFromAPI = async (input: { data: AddFromAPIType; userId: string; }) => { - if (!(await limit(input.userId, input.data.type))) { - return { - success: false, - data: 0, - error: `You have exceeded the limit of ${LIMITS[input.data.type as keyof typeof LIMITS]} ${input.data.type}s.`, - }; - } + // if (!(await limit(input.userId, input.data.type))) { + // return { + // success: false, + // data: 0, + // error: `You have exceeded the limit of ${LIMITS[input.data.type as keyof typeof LIMITS]} ${input.data.type}s.`, + // }; + // } const vectorSaveResponse = await fetch( `${process.env.BACKEND_BASE_URL}/api/add`, |