fix(api): align upload permissions and mount robots and swagger routes

This commit is contained in:
ryan
2026-08-30 17:53:42 +08:00
parent 7c5c196ede
commit 374289bfda
10 changed files with 6718 additions and 110 deletions
@@ -23,6 +23,14 @@ func TestAdminPluginUnit(t *testing.T) {
// Verify routes
routes := ctx.Router().Routes()
assert.NotEmpty(t, routes)
var hasRobots bool
for _, r := range routes {
if r.Path == "/robots.txt" && r.Method == "GET" {
hasRobots = true
break
}
}
assert.True(t, hasRobots, "admin plugin must register /robots.txt")
// Verify tasks
_, ok := ctx.Tasks().Get("admin:system_cleanup")