feat(api): GET /api/me

Returns the authenticated user (id/username/is_admin). Shape
matches UserView used in the login response so SPA stores stay
typed against one interface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 22:11:02 -04:00
parent 8537821d29
commit 2adf41604f
3 changed files with 69 additions and 8 deletions
-8
View File
@@ -6,7 +6,6 @@ package api
import (
"log/slog"
"net/http"
"github.com/go-chi/chi/v5"
"github.com/jackc/pgx/v5/pgxpool"
@@ -33,10 +32,3 @@ type handlers struct {
pool *pgxpool.Pool
logger *slog.Logger
}
// Stub handlers so Mount() compiles. Real implementations in later tasks
// replace these in place (Task 8 me).
func (h *handlers) handleGetMe(w http.ResponseWriter, r *http.Request) {
writeErr(w, http.StatusNotImplemented, "not_implemented", "me not wired")
}