-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor: change use consent hook to be powered by api hook #479
Conversation
src/types/rest-types.ts
Outdated
}; | ||
Response: { | ||
items: ConsentDirective[]; | ||
}; | ||
}; | ||
|
||
'GET /v1/consent/directives/me?includeForm=true': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't quite sure if this would work, but I did test it and appears to work.
I couldn't think of another way to differentiate the response type (generic didn't seem appropriate since it would be on the top level Rest types) - but part of me kinda likes this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a simpler change. There are currently no use cases in the SDK for fetching without the form. So, we can just update this line to be includeForm: true
, and make the response always ConsentAndForm[]
.
Does that make sense?
Pull Request Test Coverage Report for Build 7062980908
💛 - Coveralls |
@jkdowdle Also, this should definitely be a
|
31fdf61
to
d907942
Compare
@swain I did a force push to fix the semantic commit message, sorry about that. but I do think it is better to review that way since some of the other changes are just not necessary any more |
🎉 This PR is included in version 9.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Changes
useConsent
includeForm: boolean
in looking up consent directives for userScreenshots