Skip to content
Snippets Groups Projects

Stop sending username when creating or updating an event or uploading an...

Merged Maxime Chaillet requested to merge mchaille/E-DataPortal:issue269 into master
4 files
+ 18
20
Compare changes
  • Side-by-side
  • Inline
Files
4
import { Editor } from '@tinymce/tinymce-react';
import axios from 'axios';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import tinymce from 'tinymce/tinymce';
import { getFileByEventId, uploadFile } from '../../../api/icat/icatPlus';
import UI from '../../../config/ui/config';
import { Editor } from '@tinymce/tinymce-react';
import axios from 'axios';
import { EditionModeConfig } from './tinymceConfig';
import { getContent } from '../../../helpers/eventHelpers';
import {
EDIT_EVENT_CONTEXT,
HTML_CONTENT_FORMAT,
LOCALSTORAGE_KEY_EDITED_EVENT_CONTENT_IN_HTML_FORMAT,
LOCALSTORAGE_KEY_EDITED_EVENT_CONTENT_IN_PLAINTEXT_FORMAT,
LOCALSTORAGE_KEY_NEW_EVENT_CONTENT_IN_HTML_FORMAT,
LOCALSTORAGE_KEY_NEW_EVENT_CONTENT_IN_PLAINTEXT_FORMAT,
EDIT_EVENT_CONTEXT,
NEW_EVENT_CONTEXT,
PLAINTEXT_CONTENT_FORMAT,
LOCALSTORAGE_KEY_NEW_EVENT_CONTENT_IN_PLAINTEXT_FORMAT,
LOCALSTORAGE_KEY_NEW_EVENT_CONTENT_IN_HTML_FORMAT,
LOCALSTORAGE_KEY_EDITED_EVENT_CONTENT_IN_PLAINTEXT_FORMAT,
LOCALSTORAGE_KEY_EDITED_EVENT_CONTENT_IN_HTML_FORMAT,
} from '../../../constants/eventTypes';
import { getContent } from '../../../helpers/eventHelpers';
import { EditionModeConfig } from './tinymceConfig';
import UI from '../../../config/ui/config';
import { getFileByEventId, uploadFile } from '../../../api/icat/icatPlus';
const EDITOR_ID_FOR_CREATION = 'myEditorForCreation';
const EDITOR_ID_FOR_EDITION = 'myEditorForEdition';
@@ -193,7 +194,6 @@ export default class EditorWrapper extends Component {
data.append('creationDate', Date());
data.append('type', 'attachment');
data.append('category', 'file');
data.append('username', this.props.user.username);
axios({
method: 'post',
Loading