feat: add progression readiness api

This commit is contained in:
user
2026-04-26 16:39:19 +09:00
parent 600acf7303
commit a413f1ef15
16 changed files with 637 additions and 15 deletions

View File

@@ -7,19 +7,27 @@ import (
"tutor/internal/config"
"tutor/internal/interview"
"tutor/internal/learnermemory"
"tutor/internal/progression"
)
type Handler struct {
cfg config.Config
diagnostic *interview.Service
memory *learnermemory.Service
progress *progression.Service
}
func NewHandler(cfg config.Config, diagnostic *interview.Service, memory *learnermemory.Service) Handler {
func NewHandler(
cfg config.Config,
diagnostic *interview.Service,
memory *learnermemory.Service,
progress *progression.Service,
) Handler {
return Handler{
cfg: cfg,
diagnostic: diagnostic,
memory: memory,
progress: progress,
}
}
@@ -30,6 +38,8 @@ func (h Handler) Routes() http.Handler {
mux.HandleFunc("GET /api/v1/diagnostic-sessions/{id}", h.getDiagnosticSession)
mux.HandleFunc("POST /api/v1/diagnostic-sessions/{id}/answers", h.submitDiagnosticAnswer)
mux.HandleFunc("GET /api/v1/learners/{userID}/memory", h.getLearnerMemory)
mux.HandleFunc("GET /api/v1/learners/{userID}/readiness-map", h.getReadinessMap)
mux.HandleFunc("GET /api/v1/learners/{userID}/next-challenge", h.getNextChallenge)
return mux
}