<commit_before>import { djSelector } from '../selectors/boothSelectors';

import {
  SKIP_DJ_START, SKIP_DJ_COMPLETE,
  MOVE_USER_START, MOVE_USER_COMPLETE,
  REMOVE_USER_START, REMOVE_USER_COMPLETE,
  MUTE_USER_START, MUTE_USER_COMPLETE,
  UNMUTE_USER_START, UNMUTE_USER_COMPLETE,
  BAN_USER_START, BAN_USER_COMPLETE,
  SET_USER_ROLE_START, SET_USER_ROLE_COMPLETE
} from '../constants/actionTypes/moderation';

import {
  removeMessage, removeMessagesByUser, removeAllMessages
} from './ChatActionCreators';
import {
  del, post, put
} from './RequestActionCreators';

export function skipCurrentDJ(reason = '', shouldRemove = false) {
  return (dispatch, getState) => {
    const dj = djSelector(getState());
    if (!dj) {
      return null;
    }
    const payload = {
      userID: dj._id,
      reason,
      remove: shouldRemove
    };
    return post(`/booth/skip`, payload, {
      onStart: () => ({ type: SKIP_DJ_START, payload }),
      onComplete: () => ({ type: SKIP_DJ_COMPLETE, payload }),
      onError: error => ({
        type: SKIP_DJ_COMPLETE,
        error: true,
        payload: error,
        meta: payload
      })
    });
  };
}

export function removeCurrentDJ(reason = '') {
  return skipCurrentDJ(reason, true);
}

export function removeWaitlistUserStart(user) {
  return {
    type: REMOVE_USER_START,
    payload: { user }
  };
}

export function removeWaitlistUserComplete(user) {<commit_msg>booth: fix sending force-skip requests<commit_after>import { djSelector } from '../selectors/boothSelectors';

import {
  SKIP_DJ_START, SKIP_DJ_COMPLETE,
  MOVE_USER_START, MOVE_USER_COMPLETE,
  REMOVE_USER_START, REMOVE_USER_COMPLETE,
  MUTE_USER_START, MUTE_USER_COMPLETE,
  UNMUTE_USER_START, UNMUTE_USER_COMPLETE,
  BAN_USER_START, BAN_USER_COMPLETE,
  SET_USER_ROLE_START, SET_USER_ROLE_COMPLETE
} from '../constants/actionTypes/moderation';

import {
  removeMessage, removeMessagesByUser, removeAllMessages
} from './ChatActionCreators';
import {
  del, post, put
} from './RequestActionCreators';

export function skipCurrentDJ(reason = '', shouldRemove = false) {
  return (dispatch, getState) => {
    const dj = djSelector(getState());
    if (!dj) {
      return null;
    }
    const payload = {
      userID: dj._id,
      reason,
      remove: shouldRemove
    };
    return dispatch(post(`/booth/skip`, payload, {
      onStart: () => ({ type: SKIP_DJ_START, payload }),
      onComplete: () => ({ type: SKIP_DJ_COMPLETE, payload }),
      onError: error => ({
        type: SKIP_DJ_COMPLETE,
        error: true,
        payload: error,
        meta: payload
      })
    }));
  };
}

export function removeCurrentDJ(reason = '') {
  return skipCurrentDJ(reason, true);
}

export function removeWaitlistUserStart(user) {
  return {
    type: REMOVE_USER_START,
    payload: { user }
  };
}

export function removeWaitlistUserComplete(user) {
{'fraction_non_alphanumeric': 0.11654526534859522, 'fraction_numerical': 0.0, 'mean_word_length': 3.6970684039087947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6425285', 'n_tokens_mistral': 977, 'n_tokens_neox': 981, 'n_words': 190}