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

create a signup_set route to allow reconsiling AN data with our KV store #63

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jms301
Copy link
Collaborator

@jms301 jms301 commented Mar 12, 2024

Good to get 2nd pair of eyes on this & shouldn't merge until it has it's own real API key!

Copy link

vercel bot commented Mar 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stop-the-tories-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2024 10:03am

Copy link
Owner

@asibs asibs left a comment

Choose a reason for hiding this comment

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

Looks good to me once we stop using the DC API Key 👍

if (
sentKey === "" ||
Buffer.byteLength(sentKey) !== Buffer.byteLength(correctKey) ||
!Crypto.timingSafeEqual(Buffer.from(sentKey), Buffer.from(correctKey))
Copy link
Owner

Choose a reason for hiding this comment

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

Nice 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just stole yours! 😆

app/api/signup_set/[constituency]/[count]/route.ts Outdated Show resolved Hide resolved
console.log(
"AN set subscriber count: API Key did not match - returning 404",
);
return new Response("Not found", { status: 404 });
Copy link
Owner

Choose a reason for hiding this comment

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

Nice, makes sense to treat this as 404 rather than advertise that the route exists but they're not auth'd

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.

2 participants