Update:
Thanks everyone for the advice. I only glanced at the brake but now that I inspected it more closely what happened was that near the brake lever, where there is that small silver cylinder where the brake lines goes into...the cable was out of it.
So all I did was put the brake line back into that silver cylinder and the brake works fine. It was like a 5 second fix.