Skip to content

Commit 4e26ca5

Browse files
authored
FFL-158: fix flagging api path (#3603)
* FFL-1548: fix API path * fix path to package.json in integrate script * lint
1 parent 8fee477 commit 4e26ca5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/flagging/INTEGRATE-FLAGGING-PACKAGE.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pushd "$FLAGGING_PATH" || exit 1
2727
# Generate UUID and update package.json version
2828
echo "Updating package version with prerelease tag and UUID..."
2929
UUID=$(uuidgen)
30-
PACKAGE_JSON_PATH="packages/flagging/package.json"
30+
PACKAGE_JSON_PATH="package.json"
3131
if [ ! -f "$PACKAGE_JSON_PATH" ]; then
3232
echo "Error: package.json not found at $PACKAGE_JSON_PATH"
3333
popd

packages/flagging/src/openfeature/provider.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ export class DatadogProvider implements Provider {
111111
async function fetchConfiguration(options: DatadogProviderOptions, context: EvaluationContext): Promise<Configuration> {
112112
const baseUrl = options.baseUrl || 'https://dd.datad0g.com'
113113

114-
const parameters = [
115-
`application_id=${options.applicationId}`,
116-
`client_token=${options.clientToken}`,
117-
`dd_api_key=${options.clientToken}`,
118-
]
114+
const parameters = [`application_id=${options.applicationId}`, `client_token=${options.clientToken}`]
119115

120-
const response = await fetch(`${baseUrl}/api/unstable/feature-flags/assignments?${parameters.join('&')}`, {
116+
const response = await fetch(`${baseUrl}/api/unstable/precompute-assignments?${parameters.join('&')}`, {
121117
method: 'POST',
118+
headers: {
119+
'Content-Type': 'application/json',
120+
'DD-API-KEY': options.clientToken,
121+
},
122122
body: JSON.stringify({
123123
context,
124124
}),

0 commit comments

Comments
 (0)