{"size": 815, "ext": "js", "max_stars_repo_path": "chatbot/scripts/services/integrationsService.js", "max_stars_repo_name": "DuoSoftware/DVP-AdminConsole-Cloud", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "chatbot/scripts/services/integrationsService.js", "max_issues_repo_name": "DuoSoftware/DVP-AdminConsole-Cloud", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "chatbot/scripts/services/integrationsService.js", "max_forks_repo_name": "DuoSoftware/DVP-AdminConsole-Cloud", "max_forks_repo_forks_event_min_datetime": "2020-02-05T18:48:48.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-18T02:26:08.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 4, "avg_line_length": 26.2903225806, "max_line_length": 83, "alphanum_fraction": 0.4969325153}
/**
 * Created by Lakmini on 01/29/2018.
 */
'use strict';
mainApp.factory("integrationsService", function ($http, $log, $filter,  baseUrls) {
    var configapp = function (configdetails,appmodule) {
        var url = "";
        if (appmodule == "FaceBook") {
            url = baseUrls.botAPIUrl + "channel/facebook"
        } else if (appmodule == "Slack") {
            url = baseUrls.botAPIUrl + "channel/slack"
        }
        return $http({
            method: 'POST',
            url: url,            
            data: configdetails
        }).then(function (response) {
            if (response.data && response.data.IsSuccess) {
                return response;
            } else {
                return response;
            }

        });
    };
    return {
        ConfigApp: configapp

    }
})
