Implement the update endpoint