Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/appview-v2' into appview-v2-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed Feb 5, 2024
2 parents ca14897 + 5cd08e4 commit 092779a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/bsky/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import assert from 'node:assert'
import { envList } from '@atproto/common'

export interface ServerConfigValues {
// service
Expand Down Expand Up @@ -78,7 +77,7 @@ export class ServerConfig {
process.env.BSKY_COURIER_IGNORE_BAD_TLS === 'true'
assert(courierHttpVersion === '1.1' || courierHttpVersion === '2')
const adminPasswords = envList(
process.env.BSKY_ADMIN_PASSWORDS || process.env.BSKY_ADMIN_PASSWORD || '',
process.env.BSKY_ADMIN_PASSWORDS || process.env.BSKY_ADMIN_PASSWORD,
)
const modServiceDid = process.env.MOD_SERVICE_DID
assert(modServiceDid)
Expand Down Expand Up @@ -234,3 +233,8 @@ function stripUndefineds(
})
return result
}

function envList(str: string | undefined): string[] {
if (str === undefined || str.length === 0) return []
return str.split(',')
}

0 comments on commit 092779a

Please sign in to comment.