Skip to content

Commit

Permalink
refactor: ask dudewhere first
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Oct 1, 2024
1 parent 8dbdc8a commit 296e31b
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions psa/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ import { mustGetEnv } from '../lib/env.js'

/** @type {import('./lib.js').Bucket[]} */
export const buckets = [
{
locator: createDudeWhereLocator(
new S3Client({
endpoint: mustGetEnv('R2_ENDPOINT'),
credentials: {
accessKeyId: mustGetEnv('R2_ACCESS_KEY_ID'),
secretAccessKey: mustGetEnv('R2_SECRET_ACCESS_KEY'),
},
region: mustGetEnv('R2_REGION')
}),
mustGetEnv('R2_DUDEWHERE_BUCKET_NAME'),
mustGetEnv('R2_CARPARK_BUCKET_NAME')
),
hasher: createHashEncodedInKeyHasher()
},
{
locator: createObjectLocator(
new S3Client({ region: mustGetEnv('S3_DOTSTORAGE_0_BUCKET_REGION') }),
Expand All @@ -28,20 +43,5 @@ export const buckets = [
r => `pickup/${r}/${r}.root.car`
),
hasher: createObjectHasher()
},
{
locator: createDudeWhereLocator(
new S3Client({
endpoint: mustGetEnv('R2_ENDPOINT'),
credentials: {
accessKeyId: mustGetEnv('R2_ACCESS_KEY_ID'),
secretAccessKey: mustGetEnv('R2_SECRET_ACCESS_KEY'),
},
region: mustGetEnv('R2_REGION')
}),
mustGetEnv('R2_DUDEWHERE_BUCKET_NAME'),
mustGetEnv('R2_CARPARK_BUCKET_NAME')
),
hasher: createHashEncodedInKeyHasher()
}
]

0 comments on commit 296e31b

Please sign in to comment.