Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Fix incorrect config reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ScopeyNZ committed Nov 18, 2021
1 parent 68e3eac commit c2390d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { OptionsOfJSONResponseBody } from 'got'
interface ContentfulConfig {
contentManagementApiKey: string;
environmentName: string;
spaceIds: Array<string>;
selectedSpaces: Array<string>;
}

const appUrl = 'https://contentful-app.chec.io';
Expand All @@ -23,7 +23,7 @@ const handler: IntegrationHandler = async (request, context) => {
const config: ContentfulConfig = integration.config;

// Parse the list of chosen spaces into an object keyed by organisation ID
const spacesByOrg: { [orgId: string]: Array<string> } = config.spaceIds.reduce((acc: object, candidate) => {
const spacesByOrg: { [orgId: string]: Array<string> } = config.selectedSpaces.reduce((acc: object, candidate) => {
// Parse the chosen space, which is a combined org ID and space ID. The regex (for individual IDs) comes from
// Contentful documentation
const result = candidate.match(/^o:([a-zA-Z0-9-_.]{1,64})==s:([a-zA-Z0-9-_.]{1,64})$/);
Expand Down

1 comment on commit c2390d5

@vercel
Copy link

@vercel vercel bot commented on c2390d5 Nov 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.