123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- 'use strict';
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: Dashboard
- *| (C) Copyright IBM Corp. 2017, 2020
- *|
- *| US Government Users Restricted Rights - Use, duplication or disclosure
- *| restricted by GSA ADP Schedule Contract with IBM Corp.
- *+------------------------------------------------------------------------+
- */
- define(['../../lib/@waca/core-client/js/core-client/ui/core/Class'], function (Class) {
- 'use strict';
- var SmartsRecommenderService = Class.extend({
- init: function init(options) {
- SmartsRecommenderService.inherited('init', this, arguments);
- this.ajaxSvc = options.ajaxSvc;
- this.logger = options.logger;
- },
- destroy: function destroy() {
- this.ajaxSvc = null;
- this.logger = null;
- },
- _executeRequest: function _executeRequest(data, requestURL) {
- var querySpec = JSON.stringify(data);
- var requestPayload = {
- type: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: querySpec,
- processData: false,
- url: requestURL
- };
- return this.ajaxSvc.ajax(requestPayload).then(function (ajaxResponse) {
- return Promise.resolve(ajaxResponse);
- });
- }
- });
- return SmartsRecommenderService;
- });
- //# sourceMappingURL=SmartsRecommenderService.js.map
|