(function () {
"use strict";

angular.module('common')
.service('UserService', UserService);


UserService.$inject = ['$q'];
function UserService($q) {
  var service = this;
  var user = null;

  service.getUser = function () {
    var deferred = $q.defer();
    deferred.resolve(user);
    return deferred.promise;
  };

  service.saveUser = function (userToSave) {
    var deferred = $q.defer();
    user = userToSave;
    deferred.resolve(true);
    return deferred.promise;
  };
}
})();
