Bugs in my plant?

I bought a plant about 3 months ago. I can’t remember what kind it is. It looks tropical almost like a bamboo tree w/ large palm leaves. Its about 3 feet tall

Anyways, my husband got this bright idea to put old coffee grounds in the plant. he said it was good fertilizer. Well he started doing that and then I started noticing little gnats and fruit flies throughout my house. Not to mention, I woke up a few days ago to find a mushroom growing in the freaking potter.

The plant was in my living room. When I got up close to it, the dirt was crawling w/ these nasty bugs. I moved the plant outside (which its not supposed to be outside).

I know I need to put the plant in new dirt, but how can i get these damn bugs out my house. They are so tiny you can only see them when they fly right infront of your face!

Help!
Yes they must like the water!

When we put the plant outside on the patio we took the tray thing out from underneath the potter to let it drain. There was soooo much water in the planter.

ya i bought some miracle grow soil with these bugs in it :( , I hate them, basically try the vinegar as suggested, it will drown them, but mine was so bad it didn’t help much.

your best bet would be to repot the plant, and make sure the top inch of hte soil is sand, these bugs prefer wet moist soil and sand drains the water very good. This is also what is probably causing your mushroom.or mold, you don’t have well drained soil.