akai-org / akai-org/put-wiki

Add logic for reading user's profile data

Offen
#85 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:backend type:task
Vorherrschende Sprache
TypeScript
Sterne
6
Forks
3
Ø Merge
3 T. 17 Std.
Gemergte PRs (30 T.)
15

Beschreibung

## Summary
Implement the query logic to retrieve user profile information via two distinct REST endpoints: one public and one secured/private. Following our CQRS ADR ([BE-003](https://github.com/akai-org/put-wiki/blob/main/docs/architecture/adr/BE-003_read-and-write-separation.md)), these queries must bypass repositories and the domain layer entirely. Instead, project data directly from the infrastructure DbContext to DTOs (or to avoid coupling application layer to infrastructure we can use query service which has interface in application and implementation in infrastructure).

## [Acceptance criteria](https://www.atlassian.com/work-management/project-management/acceptance-criteria)
- [ ] Create an unauthenticated REST endpoint (e.g., `GET /users/{id}`) that returns a dedicated public DTO.
- [ ] The public DTO must expose at least the `Id`, `Nickname` and `JoinedDate`.
- [ ] Create a secured, authenticated REST endpoint (e.g. `GET /api/users/me` or similar) that returns a separate private DTO based on user id from token.
- [ ] The private DTO should safely return the user's full profile state, including sensitive information.
- [ ] Both endpoints must query the database directly in the application layer handler, utilizing EF Core's no-tracking feature to avoid memory overhead.

## Notes

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.