Fix decorator api_method: forgot to rename a variable when changing its name