Skip to content

fix: support admin form creates#122

Open
vagdotdev wants to merge 1 commit into
tscircuit:mainfrom
vagdotdev:bounty/create-form-data-2
Open

fix: support admin form creates#122
vagdotdev wants to merge 1 commit into
tscircuit:mainfrom
vagdotdev:bounty/create-form-data-2

Conversation

@vagdotdev

Copy link
Copy Markdown

Fixes a remaining create-route gap in the ky-backed API path: the admin page posts application/x-www-form-urlencoded data to /things/create, but the route only accepted JSON.

Changes:

  • share the create request schema across JSON and URL-encoded form bodies
  • keep JSON API creation working and assert the response in the existing ky test
  • add a ky regression test for admin-style URL-encoded form creation
  • return a 400 if neither supported body type is provided

Validation:

  • bun test tests/routes/things/create.test.ts
  • bun test
  • bun run build
  • bunx tsc --noEmit
  • bun run format:check
  • git diff --check

/claim #2

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.

1 participant