<commit_before>'use strict'

import Request from 'superagent/lib/client'

import * as tagsActions from '../constants'

export default function setTags (tags, userId) {
  return (dispatch) => {
    dispatch({type: tagsActions.SET_TAGS_REQUEST})

    Request
      .post('/api/user/' + userId + '/tag')
      .type('form')
      .send(tags)
      .end((err, resp) => {
        if (err || !resp.body) {
          return dispatch({
            type: tagsActions.SET_TAGS_RESPONSE,
            niceError: 'Can\'t set tags',
            hasError: true
          })<commit_msg>change for set user tag payload<commit_after>'use strict'

import Request from 'superagent/lib/client'

import * as tagsActions from '../constants'

export default function setTags (tags, userId) {
  return (dispatch) => {
    dispatch({type: tagsActions.SET_TAGS_REQUEST})

    Request
      .post('/api/user/' + userId + '/tag')
      .type('form')
      .send({ tag: [tags] })
      .end((err, resp) => {
        if (err || !resp.body) {
          return dispatch({
            type: tagsActions.SET_TAGS_RESPONSE,
            niceError: 'Can\'t set tags',
            hasError: true
          })
{'fraction_non_alphanumeric': 0.14114627887082976, 'fraction_numerical': 0.0, 'mean_word_length': 2.3333333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6878657', 'n_tokens_mistral': 352, 'n_tokens_neox': 355, 'n_words': 91}