Skip to content

fix: allow siteID and token to be passed in Functions v2 and Edge Fun… #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 14, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: lint errors
  • Loading branch information
hrishikesh-k authored Feb 23, 2025
commit e2dbd22267fe50f54a38609ab83074dd015dab23
18 changes: 9 additions & 9 deletions src/store_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ export const getStore: {
}

if (typeof input?.name === 'string' && typeof input?.siteID === 'string' && typeof input?.token === 'string') {
const { siteID, token } = input
const clientOptions = getClientOptions(input, { siteID, token })
const { name, siteID, token } = input
const clientOptions = getClientOptions(input, { siteID, token })

if (!name || !siteID || !token) {
throw new MissingBlobsEnvironmentError(['name', 'siteID', 'token'])
}

const client = new Client(clientOptions)

return new Store({ client, name })
if (!name || !siteID || !token) {
throw new MissingBlobsEnvironmentError(['name', 'siteID', 'token'])
}

const client = new Client(clientOptions)

return new Store({ client, name })
}

if (typeof input?.name === 'string') {
const { name } = input
const clientOptions = getClientOptions(input)
Expand Down
Loading