Skip to content

Commit

Permalink
keep global auth for now
Browse files Browse the repository at this point in the history
  • Loading branch information
tjheffner committed Dec 18, 2023
1 parent 4209e88 commit 7d462f9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/data/queries/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ export const data: QueryData<EventDataOpts, NodeEvent> = async (
opts.context,
{
params: params().getQueryObject(),
withAuth: {
clientId: process.env.DRUPAL_CLIENT_ID,
clientSecret: process.env.DRUPAL_CLIENT_SECRET,
}
}
)
: // otherwise just lookup by uuid
Expand Down
4 changes: 0 additions & 4 deletions src/data/queries/newsStory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ export const data: QueryData<NewsStoryDataOpts, NodeNewsStory> = async (
opts.context,
{
params: params().getQueryObject(),
withAuth: {
clientId: process.env.DRUPAL_CLIENT_ID,
clientSecret: process.env.DRUPAL_CLIENT_SECRET,
}
}
)
: // otherwise just lookup by uuid
Expand Down
4 changes: 0 additions & 4 deletions src/data/queries/storyListing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ export const data: QueryData<ListingPageDataOpts, StoryListingData> = async (
opts.context,
{
params: params().getQueryObject(),
withAuth: {
clientId: process.env.DRUPAL_CLIENT_ID,
clientSecret: process.env.DRUPAL_CLIENT_SECRET,
}
}
)
: // otherwise just lookup by uuid
Expand Down
4 changes: 4 additions & 0 deletions src/lib/drupal/drupalClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export const drupalClient = new DrupalClient(baseUrl, {
fetcher,
useDefaultResourceTypeEntry: true,
throwJsonApiErrors: false,
auth: {
clientId: process.env.DRUPAL_CLIENT_ID,
clientSecret: process.env.DRUPAL_CLIENT_SECRET,
},
// cache: redisCache(createRedisClient(process.env.REDIS_URL)),
previewSecret: process.env.DRUPAL_PREVIEW_SECRET,
})
2 changes: 1 addition & 1 deletion src/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function getStaticProps() {
try {
const { headerFooterData } = await getGlobalElements(
`${process.env.NEXT_PUBLIC_DRUPAL_BASE_URL}/jsonapi`,
undefined,
undefined, // no banners on 404
true // header only
)
return {
Expand Down

0 comments on commit 7d462f9

Please sign in to comment.