Changed res to send json