'use strict';

var angular = require('angular');
require('../modules');
require('./InfoRemoteService');

var module = angular.module('info.services');

module.factory('listService', function(InfoRemoteService) {
  var list = {};
  list.getListData = function(number) {
    return InfoRemoteService.queryListData(number).then(function(data) {
      return {
        list: data.content,
        number: data.number,
        totalPages: data.totalPages
      };
    });
  };
  return list;
});
