Fix api fetching data from database (execute->fetchAll)