MCPcopy Index your code
hub / github.com/CapSoftware/Cap / createLoomImportRateLimitCheck

Function createLoomImportRateLimitCheck

apps/web/actions/loom.ts:100–116  ·  view source on GitHub ↗
(userId: User.UserId)

Source from the content-addressed store, hash-verified

98 "Only organization admins and owners can import Loom videos from a CSV.";
99
100async function createLoomImportRateLimitCheck(userId: User.UserId) {
101 if (NODE_ENV !== "production") return async () => false;
102
103 const headersList = await headers();
104 const request = new Request("https://cap.so/api/loom-import-rate-limit", {
105 method: "POST",
106 headers: headersList,
107 });
108
109 return async () => {
110 const { rateLimited } = await checkRateLimit(LOOM_IMPORT_RATE_LIMIT_ID, {
111 request,
112 rateLimitKey: `loom-import:${userId}`,
113 });
114 return rateLimited;
115 };
116}
117
118function extractLoomVideoId(url: string): string | null {
119 try {

Callers 2

importFromLoomFunction · 0.85
importFromLoomCsvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected