<commit_before>(function () {
    angular
        .module('app')
        .factory('tokenInjector', tokenInjector)

    function tokenInjector($injector, $q, $cookies, $cacheFactory, $timeout) {

        var count = {}

        return {

            response: function (config) {
                let data = config.data.data
                count[config.config.url] = undefined
                if (Array.isArray(data)) {
                    for (let i = 0, len = data.length; i < len; i++) {
                        if (void 0 !== data[i].feed_id && Array.isArray(data[i].feed_id)) {
                            // 提取 feed_id 
                            if (typeof data[i].feed_id[0] === 'string') {
                                config.data.data[i].feed_id = data[i].feed_id[0]
                            } else {
                                config.data.data[i] = Object.assign(data[i].feed_id[0], data[i], {
                                    feed_id: data[i].feed_id[0]._id,
                                    feed_title: data[i].feed_id[0].title
                                })
                            }
                        }
                        if (void 0 !== data[i].user_id && Array.isArray(data[i].user_id)) {
                            config.data.data[i].user_id = data[i].user_id[0]
                        }
                    }
                } else if (typeof data === 'object') {
                    if (void 0 !== data.feed_id && Array.isArray(data.feed_id)) {
                        if (typeof data.feed_id[0] === 'string') {
                            config.data.data.feed_id = data.feed_id[0]
                        } else {
                            config.data.data = Object.assign(data.feed_id[0], data, {
                                feed_id: data.feed_id[0]._id,
                                feed_title: data.feed_id[0].title
                            })
                        }
                    }
                    if (void 0 !== data.user_id && Array.isArray(data.user_id)) {
                        config.data.data.user_id = data.user_id[0]
                    }
                }
                return $q.when(config)
            },

            // 正常情况下，XSRF 不正确会触发该错误
            // 从而触发跳转到登录页面
            // TODO 全局提示弹框
            responseError: function (rejection) {<commit_msg>[angular] remove angular response transformer<commit_after>(function () {
    angular
        .module('app')
        .factory('tokenInjector', tokenInjector)

    function tokenInjector($injector, $q, $cookies, $cacheFactory, $timeout) {

        var count = {}

        return {

            // 正常情况下，XSRF 不正确会触发该错误
            // 从而触发跳转到登录页面
            // TODO 全局提示弹框
            responseError: function (rejection) {
{'fraction_non_alphanumeric': 0.11826024442846873, 'fraction_numerical': 0.006110711718188354, 'mean_word_length': 1.0722263588979897, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '214524', 'n_tokens_mistral': 813, 'n_tokens_neox': 811, 'n_words': 128}