feat(learner): owner admin API for roles, groups, course access and library curation

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 03:20:49 +01:00
co-authored by Claude Opus 5.5
parent 668ae379bf
commit a8a8e32bcb
3 changed files with 195 additions and 0 deletions
@@ -2,6 +2,7 @@ import type { AuthService, Feature, ServerContext } from "@stc/contracts";
import { createAuth } from "./auth";
import { runMigrations } from "./migrate";
import { json } from "./http";
import { adminRoutes } from "./admin";
/**
* The learner feature: auth, library, reader, notes, progress and exercises.
@@ -20,6 +21,7 @@ export function learnerFeature(ctx: ServerContext): Feature & { auth: AuthServic
"/api/learner/providers": {
GET: async () => json({ emailPassword: true, providers: auth.providers(), sso: await auth.hasSso() }),
},
...adminRoutes(ctx, auth.service.invalidate),
};
return { name: "learner", routes, auth: auth.service };
}