The move will bar Trump from further military action against Venezuela without congressional approval.