Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DFP endpoints #348

Merged
merged 5 commits into from
Jan 6, 2025
Merged

Add DFP endpoints #348

merged 5 commits into from
Jan 6, 2025

Conversation

jennifer-stytch
Copy link
Contributor

@jennifer-stytch jennifer-stytch commented Jan 3, 2025

This PR adds the two backend DFP endpoints: /v1/fingerprint/lookup and /v1/rules/set

Marking as MAJOR because of the metric_type fix from optional to required.

};

export async function request<T>(
fetchConfig: fetchConfig,
requestConfig: requestConfig
): Promise<T> {
const url = new URL(requestConfig.url, fetchConfig.baseURL);
const baseURL =
requestConfig.baseURLType && requestConfig.baseURLType == "FRAUD"
Copy link
Contributor

Choose a reason for hiding this comment

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

  • In JS, pretty much always prefer === over ==.
  • No need to check for truthiness here - undefined == "FRAUD" will produce false
Suggested change
requestConfig.baseURLType && requestConfig.baseURLType == "FRAUD"
requestConfig.baseURLType === "FRAUD"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jennifer-stytch jennifer-stytch merged commit 2b2af90 into main Jan 6, 2025
8 of 11 checks passed
@jennifer-stytch jennifer-stytch deleted the jmccleary/fraud-client branch January 6, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants