'use strict'; define(['app'], function (app) { app.factory("User", ['$http', '$log', '$upload', function ($http, $log, $upload) { return { getUserSession : function (parameter) { return $http.post("user/getUserSession", parameter).then(function (response) { $log.debug("사용자 세션 결과 : ", response); return response.data; }); }, updateUserSession : function (conditions) { return $http.post("user/updateUserSession", conditions).then(function (response) { $log.debug("접속한 각 사용자들이 직접 자신의 세션을 업데이트한 결과 : ", response); return response; }); }, add : function (conditions) { conditions.url = "user/add"; return $upload.upload(conditions).then(function (response) { $log.debug("사용자 생성 결과 : ", response); return response; }); }, returnEmailPassword : function (conditions) { return $http.post("user/returnEmailPassword", conditions).then(function (response) { $log.debug("사용자 이메일로 비밀번호 전송 결과 : ", response); return response; }); }, updateLastWorkspace : function (conditions) { return $http.post("user/updateLastWorkspace", conditions).then(function (response) { $log.debug("사용자가 마지막으로 선택한 워크스페이스 : ", response); return response; }); }, updateLastProject : function (conditions) { return $http.post("user/updateLastProject", conditions).then(function (response) { $log.debug("사용자가 마지막으로 선택한 프로젝트 : ", response); return response; }); }, updateLastIssueType : function (conditions) { return $http.post("user/updateLastIssueType", conditions).then(function (response) { $log.debug("사용자가 마지막으로 선택한 이슈 유형 : ", response); return response; }); }, find : function (conditions) { return $http.post("user/find", conditions).then(function (response) { $log.debug("사용자 목록 데이터 : ", response); return response; }); }, findByAllWorkspace : function (conditions) { return $http.post("user/findByAllWorkspace", conditions).then(function (response) { $log.debug("전체 업무 공간 사용자 목록 데이터 : ", response); return response; }); }, detail : function (conditions) { return $http.post("user/detail", conditions).then(function (response) { $log.debug("사용자 상세 데이터 : ", response); return response; }); }, findMyLevelAndDepartment : function (conditions) { return $http.post("user/findMyLevelAndDepartment", conditions).then(function (response) { $log.debug("내 정보 데이터 : ", response); return response; }); }, modify : function (conditions) { conditions.url = "user/modify"; return $upload.upload(conditions).then(function (response) { $log.debug("사용자 정보 수정 결과 : ", response); return response; }); }, modifyPassword : function (conditions) { return $http.post("user/modifyPassword", conditions).then(function (response) { $log.debug("사용자 비밀번호 변경 결과 : ", response); return response; }); }, findProjectMember : function (conditions) { return $http.post("user/findProjectMember", conditions).then(function (response) { $log.debug("프로젝트에 참여하는 일반 사용자 목록 조회 : ", response); return response; }); }, withDraw : function (conditions) { return $http.post("user/withDraw", conditions).then(function (response) { $log.debug("회원 탈퇴 결과 : ", response); return response; }); }, } } ]) });