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

Function getOrganizationBucket

apps/web/actions/organization/storage.ts:271–287  ·  view source on GitHub ↗
(
	organizationId: Organisation.OrganisationId,
)

Source from the content-addressed store, hash-verified

269};
270
271const getOrganizationBucket = async (
272 organizationId: Organisation.OrganisationId,
273) => {
274 const [bucket] = await db()
275 .select()
276 .from(s3Buckets)
277 .where(
278 and(
279 eq(s3Buckets.organizationId, organizationId),
280 eq(s3Buckets.active, true),
281 ),
282 )
283 .orderBy(desc(s3Buckets.updatedAt))
284 .limit(1);
285
286 return bucket ?? null;
287};
288
289const getS3InputCredentials = async (input: S3ConfigInput) => {
290 const hasAccessKeyId = input.accessKeyId.trim().length > 0;

Callers 3

getS3InputCredentialsFunction · 0.85

Calls 1

dbFunction · 0.90

Tested by

no test coverage detected