feat: serve the student app from the plugin

This commit is contained in:
Jakub Zych
2026-10-02 14:43:02 +02:00
parent 5106239c97
commit 21107e9804
7 changed files with 491 additions and 0 deletions

View File

@@ -115,6 +115,13 @@ func TestRoutes(t *testing.T) {
if rt.PluginID != "jz.bm" {
continue
}
if rt.Method+" "+rt.Pattern == "GET /{path...}" {
// The student app, public by design; see static_test.go.
if len(rt.Middleware) != 0 {
t.Errorf("the student app has middleware %v", rt.Middleware)
}
continue
}
got = append(got, rt.Method+" "+rt.Pattern)
if !slices.Contains(rt.Middleware, "jwt.auth") {
t.Errorf("%s %s is not behind jwt.auth: %v", rt.Method, rt.Pattern, rt.Middleware)