Merge branch 'refactor-get-account-by-token' into refactor/get-account-usage

This commit is contained in:
bcmmbaga 2024-09-26 16:34:36 +03:00
commit 30253b0565
No known key found for this signature in database
GPG Key ID: 511EED5C928AD547

View File

@ -204,6 +204,10 @@ func (h *Policies) savePolicy(w http.ResponseWriter, r *http.Request, accountID
policy.Rules = append(policy.Rules, &pr)
}
if req.SourcePostureChecks != nil {
policy.SourcePostureChecks = *req.SourcePostureChecks
}
if err := h.accountManager.SavePolicy(r.Context(), accountID, userID, &policy, isUpdate); err != nil {
util.WriteError(r.Context(), err, w)
return