Skip to content

refactor(agents): extract shared validation helper - #422

Merged
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
Jagadeeshftw:refactor/agents-01-validation-helper
Jul 29, 2026
Merged

refactor(agents): extract shared validation helper#422
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
Jagadeeshftw:refactor/agents-01-validation-helper

Conversation

@Jagadeeshftw

Copy link
Copy Markdown
Contributor

Closes #371

Summary

  • Extracts the repeated agent-id validation into a shared helper
  • Reuses that helper across the usage and settlement handlers that accept agents
  • Adds direct coverage for the helper and the affected invalid-request paths

Validation

  • npm run lint
  • node --test dist/usage-agent-validation.test.js dist/usage.test.js dist/routes/usage.test.js

@mikewheeleer
mikewheeleer merged commit dfd9f5f into Agentpay-Org:main Jul 29, 2026
1 check failed
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.

Extract the shared agents handler validation into a reusable helper

2 participants