{:uriI"¥file://app/assets/javascripts/services/SurveyService.js?type=application/javascript&pipeline=self&id=e5a3777a31ecb4ea5529d7d53c50977408aa486d638c87178bd7db16669911f0:ET:load_pathI"app/assets/javascripts;T: filenameI"5app/assets/javascripts/services/SurveyService.js;T: nameI"services/SurveyService;T:logical_pathI"#services/SurveyService.self.js;T:content_typeI"application/javascript;T: sourceI"l testApp.constant('SURVEY_EVENTS', { create: 'create', update: 'update', destroy: 'destroy', }) testApp.factory('Survey', ['$rootScope', 'SURVEY_EVENTS', 'ApiAdapter', function($rootScope, SURVEY_EVENTS, ApiAdapter) { ApiAdapter.addRoute( "get_surveys", "/surveys" ); ApiAdapter.addRoute( "get_survey", "/surveys/{surveyId}" ); ApiAdapter.addRoute( "create_survey", "/surveys", { "type": "POST", "processData": false, "contentType": "application/json", "success": function(result) { $rootScope.$broadcast(SURVEY_EVENTS.create, result.response); } } ); ApiAdapter.addRoute( "update_survey", "/surveys/{surveyId}", { "type": "PUT", "processData": false, "contentType": "application/json", "success": function(result) { $rootScope.$broadcast(SURVEY_EVENTS.update, result.response); } } ); ApiAdapter.addRoute( "delete_survey", "/surveys/{surveyId}", { "type": "DELETE", "success": function(result) { $rootScope.$broadcast(SURVEY_EVENTS.destroy, result); } } ); ApiAdapter.addRoute( "get_survey_questions", "/surveys/{surveyId}/questions", { "type": "GET" } ); return { get: function(params, data, args) { args.noCache = ((typeof(args.noCache) != "boolean")? true : args.noCache); return ApiAdapter.execute("get_survey", params, data, args); }, index: function(params, data, args) { args.noCache = ((typeof(args.noCache) != "boolean")? true : args.noCache); return ApiAdapter.execute("get_surveys", params, data, args); }, create: function(params, data, args) { args.noCache = ((typeof(args.noCache) != "boolean")? true : args.noCache); return ApiAdapter.execute("create_survey", params, data, args); }, update: function(params, data, args) { args.noCache = ((typeof(args.noCache) != "boolean")? true : args.noCache); return ApiAdapter.execute("update_survey", params, data, args); }, destroy: function(params, data, args) { args.noCache = ((typeof(args.noCache) != "boolean")? true : args.noCache); return ApiAdapter.execute("delete_survey", params, data, args); }, questions: function(params, data, args) { args.noCache = ((typeof(args.noCache) != "boolean")? true : args.noCache); return ApiAdapter.execute("get_survey_questions", params, data, args); } }; } ]); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"Cfile-digest://app/assets/javascripts/services/SurveyService.js;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%ã:iˆ]* ̈yðzÕΉˆmp„I´6¶Mk‰P.Nâ: lengthil :dependencies_digest"%J©³rqJítV¯—¤á@§:sÑŸ]¡uç“ÓmAu¨·:idI"Ee5a3777a31ecb4ea5529d7d53c50977408aa486d638c87178bd7db16669911f0;F: mtimel+,]V