# MapMetaController.java

    package io.github.js0ny.ilp_coursework.controller;

    import io.github.js0ny.ilp_coursework.data.external.RestrictedArea;
    import io.github.js0ny.ilp_coursework.data.external.ServicePoint;
    import io.github.js0ny.ilp_coursework.service.DroneInfoService;

    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;

    import java.util.List;

    @RestController
    @RequestMapping("/api/v1")
    public class MapMetaController {

        private static final Logger log = LoggerFactory.getLogger(MapMetaController.class);

        private final DroneInfoService droneInfoService;

        public MapMetaController(DroneInfoService droneInfoService) {
            this.droneInfoService = droneInfoService;
        }

        @GetMapping("/restrictedAreas")
        public List<RestrictedArea> getRestrictedAreas() {
            log.info("GET /api/v1/restrictedAreas");
            return droneInfoService.fetchRestrictedAreas();
        }

        @GetMapping("/servicePoints")
        public List<ServicePoint> getServicePoints() {
            log.info("GET /api/v1/servicePoints");
            return droneInfoService.fetchServicePoints();
        }
    }