1
0
forked from wrenn/wrenn

fix: admin capsule create audit log uses PlatformTeamID

POST /v1/admin/capsules was outside the injectPlatformTeam middleware
subrouter, so audit entries landed under the admin's personal team.
This commit is contained in:
2026-04-21 14:54:52 +06:00
parent ebbbde9cd1
commit 684c98b0fa

View File

@ -55,6 +55,7 @@ func (h *adminCapsuleHandler) Create(w http.ResponseWriter, r *http.Request) {
return return
} }
ac.TeamID = id.PlatformTeamID
h.audit.LogSandboxCreate(r.Context(), ac, sb.ID, sb.Template) h.audit.LogSandboxCreate(r.Context(), ac, sb.ID, sb.Template)
writeJSON(w, http.StatusCreated, sandboxToResponse(sb)) writeJSON(w, http.StatusCreated, sandboxToResponse(sb))
} }