fix: foreign key violation when deleting tailnet

This commit is contained in:
Johan Siebens
2022-07-15 07:43:31 +02:00
parent 70e84be8f4
commit f225f427ac
3 changed files with 13 additions and 0 deletions
+4
View File
@@ -101,6 +101,10 @@ func (s *Service) DeleteTailnet(ctx context.Context, req *connect.Request[api.De
return err
}
if err := tx.DeleteApiKeysByTailnet(ctx, req.Msg.TailnetId); err != nil {
return err
}
if err := tx.DeleteAuthKeysByTailnet(ctx, req.Msg.TailnetId); err != nil {
return err
}