store: host_credentials becomes kind-aware (repo + admin slots)
This commit is contained in:
@@ -167,7 +167,7 @@ func (s *Server) handleAgentEnroll(w stdhttp.ResponseWriter, r *stdhttp.Request)
|
||||
// /api/hosts/{id}/repo-credentials. Failing the whole enrolment
|
||||
// here would leave a half-burned token + an orphan host.
|
||||
if encForHost != "" {
|
||||
if err := s.deps.Store.SetHostCredentials(r.Context(), hostID, encForHost); err != nil {
|
||||
if err := s.deps.Store.SetHostCredentials(r.Context(), hostID, store.CredKindRepo, encForHost); err != nil {
|
||||
slog.Error("enrollment: set host credentials failed",
|
||||
"host_id", hostID, "err", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user