Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ratefeature-model.service.js « ratefeature « angularjs « Feedback « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6483282f4f8bc7cfe0d820e81d546113a5455bf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */

(function () {
    angular.module('piwikApp').factory('rateFeatureModel', rateFeatureModel);

    rateFeatureModel.$inject = ['piwikApi'];

    function rateFeatureModel(piwikApi) {

        return {
            sendFeedbackForFeature: sendFeedbackForFeature
        };

        function sendFeedbackForFeature (featureName, like, message) {
            return piwikApi.fetch({
                method: 'Feedback.sendFeedbackForFeature',
                featureName: featureName,
                like: like ? '1' : '0',
                message: message + ''
            });
        }

    }
})();