Skip to content

Commit

Permalink
Put api keys in explicit apiKey object
Browse files Browse the repository at this point in the history
  • Loading branch information
paullinator committed Oct 1, 2023
1 parent 0da301f commit fd17548
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/queryEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ async function runPlugin(
}

// set apiKeys and settings for use in partner's function
const apiKeys = app.partnerIds[partnerId]
const { apiKeys } = app.partnerIds[partnerId]
const settings = progressSettings.progressCache
datelog(`Querying ${app.appId.toLowerCase()}_${partnerId}`)
// run the plugin function
Expand Down
7 changes: 5 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,16 @@ export const asStandardPluginParams = asObject({
})
})

const asApiKeys = asMap(asString)
const asPartnerInfo = asObject({
apiKeys: asMap(asString)
})

export const asApp = asObject({
_id: asString,
_rev: asString,
appId: asString,
appName: asString,
partnerIds: asMap(asApiKeys)
partnerIds: asMap(asPartnerInfo)
})

export const asApps = asArray(asApp)
Expand Down

0 comments on commit fd17548

Please sign in to comment.