Fix the route for getting media and layer