Module test

Source
Expand description

Test-only routes (mounted under /api/test in non-production envs).

These endpoints exist solely for E2E/integration tests (seed, lookup, teardown). They must never be exposed in production.

§Endpoints

  • POST /api/test/users – Create or update a user (idempotent, returns id).
  • GET /api/test/users?username=NAME – Fetch a user by username.
  • DELETE /api/test/users/{id} – Delete a user by numeric ID.

Structs§

TestUserResponse
Minimal response payload returned from the test endpoints.
UpsertUserRequest
Request body used by POST /api/test/users to create-or-update a user.

Functions§

delete_user
DELETE /api/test/users/{user_id}
get_user
GET /api/test/users?username={username}
test_routes
Registers the test routes on a Router<AppState>.
upsert_user
POST /api/test/users