Commit 8c30f6fc authored by Nicola Fulvio Calabria's avatar Nicola Fulvio Calabria
Browse files

Minor refactoring

parent bf4eb6eb
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -6,8 +6,7 @@
package it.inaf.oats.vospace;

import it.inaf.ia2.aa.data.User;
import it.inaf.oats.vospace.datamodel.collections.NodeCollectionsList;
import it.inaf.oats.vospace.persistence.CollectionsDAO;
import it.inaf.oats.vospace.datamodel.collections.NodeCollectionsWrapper;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,11 +32,11 @@ public class CollectionsController {

    // list collections owned by user
    @GetMapping(value = "/collections")
    public ResponseEntity<NodeCollectionsList> listCollections(
    public ResponseEntity<NodeCollectionsWrapper> listCollections(
            HttpServletRequest request, User principal) {
        LOG.debug("list collections called for user {}", principal.getName());

        NodeCollectionsList ncl = new NodeCollectionsList();
        NodeCollectionsWrapper ncl = new NodeCollectionsWrapper();

        ncl.setNodeCollections(
                collectionsService.listCollections(principal.getName()));