Add write functionality to votes endpoint