Skip to content

Commit b6c718e

Browse files
authored
Merge pull request #849 from constructive-io/fix/send-email-link-use-meta-schema
fix(send-email-link): use X-Meta-Schema for platform data queries
2 parents bb4bb79 + 49db980 commit b6c718e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

functions/send-email-link/src/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,11 @@ app.post('/', async (req: any, res: any, next: any) => {
361361
...(schemata && { schemata }),
362362
});
363363

364-
// For GetDatabaseInfo query - uses same API routing as client
365-
// The private API exposes both user and database queries
364+
// For GetDatabaseInfo query - uses X-Meta-Schema to access platform data
365+
// (databases, sites, domains, siteThemes, siteModules are platform-level data)
366366
const meta = createGraphQLClient(metaGraphqlUrl, {
367367
hostHeaderEnvVar: 'META_GRAPHQL_HOST_HEADER',
368-
databaseId,
369-
...(apiName && { apiName }),
370-
...(schemata && { schemata }),
368+
useMetaSchema: true,
371369
});
372370

373371
const result = await sendEmailLink(params, {

0 commit comments

Comments
 (0)