[TASK] refactor config to be accessed through app in API handlers