Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/storage/object/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ function createBucketIfMissing(client) {
);
}

/**
* Check to see if the org is in the existing list of orgs
*
* @param {Object} env the cloud provider environment
* @param {*} org the org associated with the bucket
* @returns null
*/
async function checkOrgIndex(env, org) {
const orgs = await env.DA_AUTH.get('orgs', { type: 'json' });
if (orgs.some((existingOrg) => existingOrg.name === org)) return;
orgs.push({ name: org, created: new Date().toISOString() });
await env.DA_AUTH.put('orgs', JSON.stringify(orgs));
}

export default async function putObject(env, daCtx, obj) {
const config = getS3Config(env);
const client = new S3Client(config);
Expand All @@ -74,8 +60,6 @@ export default async function putObject(env, daCtx, obj) {

// Only allow creating a new bucket for orgs and repos
if (key.split('/').length <= 1) {
// await checkOrgIndex(env, org);

// R2 ONLY FEATURE
createBucketIfMissing(client);
}
Expand Down