fixed endpoint to update records