Merge pull request #1885 from gravitl/story/GRA-842-1

add mq removal on host delete
This commit is contained in:
dcarns 2022-12-29 11:36:11 -05:00 committed by GitHub
commit e1929dd039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,6 +130,10 @@ func deleteHost(w http.ResponseWriter, r *http.Request) {
return
}
if err = mq.DeleteMqClient(currHost.ID.String()); err != nil {
logger.Log(0, "error removing DynSec credentials for host:", currHost.Name, err.Error())
}
apiHostData := currHost.ConvertNMHostToAPI()
logger.Log(2, r.Header.Get("user"), "removed host", currHost.Name)
w.WriteHeader(http.StatusOK)