Skip to content

chore(admin): remove stale session-DTO TODO#73

Merged
Bccorb merged 1 commit into
mainfrom
refactor/admin-session-dto
Jul 7, 2026
Merged

chore(admin): remove stale session-DTO TODO#73
Bccorb merged 1 commit into
mainfrom
refactor/admin-session-dto

Conversation

@Bccorb

@Bccorb Bccorb commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Closes #16

Summary

#16 asked for a reusable public session DTO for the admin APIs (session shaping was duplicated with a TODO). That refactor is already in place:

  • serializeSession (src/services/apiResponseSerializers.ts) is the shared mapper, used by getUserDetail, listUserSessions, and listAllSessions.
  • The public schema is SessionSchema / SessionListResponseSchema (src/schemas/session.responses.ts), and the admin session routes declare it as their 200 response, so responses are validated.

The only remnant was a stale // TODO: Need a public session return type for sessions comment above listUserSessions. This removes it. No behavior change.

Testing

Lint + typecheck clean.

The shared session serializer (serializeSession) and public response
schema (SessionListResponseSchema / SessionSchema) already exist and are
used by getUserDetail, listUserSessions, and listAllSessions, and the
routes validate responses against them. Remove the now-inaccurate TODO.

Closes #16
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Bccorb Bccorb merged commit 7ebbdd1 into main Jul 7, 2026
2 of 3 checks passed
@Bccorb Bccorb deleted the refactor/admin-session-dto branch July 7, 2026 19:36
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.

[Feature]: Introduce a reusable public session DTO for admin APIs

2 participants