Move data resolving logic to router
Use constants for API urls