Yipes, been there quite a few times

I've washed my hubby's phone twice and both times took it apart to dry and it was fine. It's really bad when it's salt water, then just kiss it goodbye cuz the salt pretty much corrodes the insides almost instantly.
Hopefully it'll work okay after you leave it for a day or two to completely dry