Skip to content

Return user departments from /auth/login#1106

Merged
frankrousseau merged 1 commit into
cgwire:mainfrom
NicoPennec:main
Jun 12, 2026
Merged

Return user departments from /auth/login#1106
frankrousseau merged 1 commit into
cgwire:mainfrom
NicoPennec:main

Conversation

@NicoPennec

Copy link
Copy Markdown
Member

Related to cgwire/kitsu#2045

Problem

  • POST /auth/login serializes the user without relations, so departments are missing from the response (unlike GET /auth/authenticated).

Solution

  • Enrich the login user payload with departments, reusing the same relations-aware serialization as /auth/authenticated

POST /auth/login built its user payload via check_auth(), which
serializes the person without relations, so the many-to-many
departments were missing — unlike GET /auth/authenticated, which
returns them (relations=True).

Enrich the login user with departments to reach parity with
/auth/authenticated, reusing the same relations-aware serialization.

Related to cgwire/kitsu#2045
@frankrousseau frankrousseau merged commit 8bacd0b into cgwire:main Jun 12, 2026
14 checks passed
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