Brake pedal has very little resistance

My car was making squealing noises, and at the workshop they told me it was the brakes, so I cleaned the brake pads. I accidentally loosened the main line for the brake fluid and some brake fluid drained out. When I was finished I drove to the workshop to buy some brake fluid. The brakes are working but not very optimally, there is hardly any resistance when I step on the brake pedal, and can quite easily push it all the way down to the floor. I topped up the brake fluid and thought that this would fix the problem, yet the brakes were the same on the ride home, very little resistance. What can

– Brake pedal has very little resistance