Weaver Ants (as well as Weaver Ant Larvae) are apparently one of the best insects humans can consume. According to Wikipedia:
Weaver ants are one of the most valued types of insects eaten by humans (entomophagy). In addition to being used as a biological control agent to increase plant production, weaver ants can be utilized directly as a protein and food source since the ants (especially the ant larvae) are edible for humans and high in protein and fatty acids.
Termites are also highly edible. The Wikipedia page for termites states:
43 termite species are used as food by humans or are fed to livestock. These insects are particularly important in less developed countries where malnutrition is common, as the protein from termites can help improve the human diet.
As for if they can be harmful to you, according to this webpage, termites have not be known to carry harmful diseases.
Termites may bite and sting, but these wounds are not toxic. Termites are not known to carry diseases harmful to humans, either.
I couldn't find much about Weaver Ants containing any parasites, but I have found an article stating that consuming them can actually rid you of certain pathogens such as dysentery.
Considering how widely consumed Weaver Ants are in certain countries, and that 43 termite species have been found to be used as food, I would say that given the amount you are eating, you should experience no illness, especially if you prepare them by cooking them.