talk icon indicating copy to clipboard operation
talk copied to clipboard

add api key check to counts v2

Open tessalt opened this issue 5 months ago • 1 comments

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

Were any tests migrated to React Testing Library?

How do we deploy this PR?

tessalt avatar Jun 16 '25 17:06 tessalt