talk
talk copied to clipboard
add api key check to counts v2
What does this PR do?
Updates the counts v2 endpoint to require either an admin access token or an admin-generated API key
These changes will impact:
- [ ] commenters
- [ ] moderators
- [ ] admins
- [x] developers
What changes to the GraphQL/Database Schema does this PR introduce?
none
Does this PR introduce any new environment variables or feature flags?
If any indexes were added, were they added to INDEXES.md?
How do I test this PR?
enable COUNTS_V2 feature flag
use the createToken mutation to create a token, as an admin user
try making a request to counts v2 without token, see that you get a 401 error
try making a request to coutns v2 with the token, it should succeed