'use strict';

var angular = require('angular');
require('jsUtil');
require('../modules');
require('./Meet');
require('./MeetRemoteService');

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

module.factory('MeetService', function(Meet, MeetRemoteService) {
  var service = {};
  service.getWeekOfMeet = function(weekFlag, date) {

    return MeetRemoteService.get(weekFlag, date).then(function(data) {
      data.content = Meet.sortMeet(data.content);
      return data;
    });
  }
  return service;
});
