@@ -0,0 +1,1734 @@
+package banane.io.pdb.web;%0A%0Aimport banane.io.pdb.model.Base;%0Aimport banane.io.pdb.model.Direction;%0Aimport banane.io.pdb.model.MapPoint;%0Aimport banane.io.pdb.repository.MapPointRepository;%0Aimport banane.io.pdb.security.SecurityService;%0Aimport banane.io.pdb.service.MapPointService;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.web.bind.annotation.GetMapping;%0Aimport org.springframework.web.bind.annotation.PathVariable;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RestController;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.stream.Collectors;%0A%0Aimport static com.google.common.base.Preconditions.checkNotNull;%0A%0A@RestController%0A@RequestMapping(%22/api/base%22)%0Apublic class BaseController %7B%0A%0A    @Autowired%0A    private SecurityService securityService;%0A%0A    private static final Logger logger = LoggerFactory.getLogger(BaseController.class);%0A%0A    /**%0A     * Load a grid of point with the center being the mapPoint passed in parameter%0A     * %0A     */%0A    @GetMapping(%22/resources%22)%0A    public ResponseEntity%3CList%3CInteger%3E%3E resources() %7B%0A        logger.info(%22Fetching base ressources%22);%0A        final Base base = securityService.findLoggedInUser().getHero().getBase();%0A        List%3CInteger%3E ressourcesInBase = new ArrayList%3C%3E(4);%0A        ressourcesInBase.add(base.getStone());%0A        ressourcesInBase.add(base.getWood());%0A        return ResponseEntity.status(HttpStatus.OK).body(ressourcesInBase);%0A    %7D%0A%0A%7D%0A

Add new Base Controller