<commit_before>'use strict'

angular.module('serinaApp').factory('DataAccessor', function ($rootScope, $http) {
  return {

    getListLang: function () {
      return $http.get($rootScope.endPoint + '/list-lang')
    },

    openLang: function (lang) {
      return $http.get($rootScope.endPoint + '/open/' + lang.toLowerCase())
    },

    downloadLang: function (lang) {
      return $http.get($rootScope.endPoint + '/download/' + lang.toLowerCase())
    },

    addLang: function (lang) {
      return $http.get($rootScope.endPoint + '/create/' + lang.toLowerCase())
    },

    addGroup: function (lang, groups, groupName) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/group/add', {groupName: groupName.toLowerCase(), groups: groups})
    },

    addTrad: function (lang, groups, trad) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/trad/add', {trad: trad, groups: groups})
    },

    majGroup: function (lang, groups, groupName, originalGroupName) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/group/maj', {groupName: groupName.toLowerCase(), groups: groups, originalGroupName: originalGroupName})
    },

    majTrad: function (lang, groups, trad) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/trad/maj', {trad: trad, groups: groups})
    },

    deleteLang: function (lang) {
      return $http.get($rootScope.endPoint + '/delete/' + lang.toLowerCase())
    },

    deleteGroup: function (lang, groups, groupName) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/group/del', {groupName: groupName.toLowerCase(), groups: groups})
    },

    deleteTrad: function (lang, groups, trad) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/trad/del', {trad: trad, groups: groups})
    }

  }
})<commit_msg>Update route DataAccessor service<commit_after>'use strict'

angular.module('serinaApp').factory('DataAccessor', function ($rootScope, $http) {
  return {

    getListLang: function () {
      return $http.get($rootScope.endPoint + '/list-lang')
    },

    openLang: function (lang) {
      return $http.get($rootScope.endPoint + '/open/' + lang.toLowerCase())
    },

    downloadLang: function (lang) {
      return $http.get($rootScope.endPoint + '/download/' + lang.toLowerCase())
    },

    addLang: function (lang) {
      return $http.get($rootScope.endPoint + '/create/' + lang.toLowerCase())
    },

    deleteLang: function (lang) {
      return $http.get($rootScope.endPoint + '/delete/' + lang.toLowerCase())
    },

    addGroup: function (lang, levels, groupName) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/group/add', {groupName: groupName.toLowerCase(), levels: levels})
    },

    majGroup: function (lang, levels, groupName, originalGroupName) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/group/maj', {groupName: groupName.toLowerCase(), levels: levels, originalGroupName: originalGroupName})
    },

    deleteGroup: function (lang, levels, groupName) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/group/del', {groupName: groupName.toLowerCase(), levels: levels})
    },

    addTranslation: function (lang, levels, translation) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/translation/add', {translation: translation, levels: levels})
    },

    majTranslation: function (lang, levels, translation) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/translation/maj', {translation: translation, levels: levels})
    },

    deleteTranslation: function (lang, levels, translation) {
      return $http.post($rootScope.endPoint + '/' + lang.toLowerCase() + '/translation/del', {translation: translation, levels: levels})
    }

  }
})
{'fraction_non_alphanumeric': 0.17192712342827815, 'fraction_numerical': 0.0, 'mean_word_length': 3.6626794258373208, 'pattern_counts': {'":': 0, '<': 3, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3860274', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1187, 'n_words': 245}