Revert back the refactor code for getApps