Fix missing error check.

This commit is contained in:
Ward Vandewege 2021-11-13 15:24:32 -05:00
parent acf7e462ad
commit 34dba0ade8

View File

@ -68,7 +68,10 @@ func (h *Headscale) DestroyNamespace(name string) error {
return err return err
} }
for _, p := range keys { for _, p := range keys {
h.DestroyPreAuthKey(&p) err = h.DestroyPreAuthKey(&p)
if err != nil {
return err
}
} }
if result := h.db.Unscoped().Delete(&n); result.Error != nil { if result := h.db.Unscoped().Delete(&n); result.Error != nil {