Fix variable name

`res` is undefined. Should be `data`