mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 15:38:15 +00:00
Improve response catch module (#3848)
* add err hanlder for dialog ajax request * add error handler for component ajax request * repair code bug * repair code bug * add handler for page ajax module
This commit is contained in:
@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { Modal, ModalHeader, ModalBody, ModalFooter, Input, Button } from 'reactstrap';
|
||||
import Utils from '../../utils/utils';
|
||||
import toaster from '../toast';
|
||||
|
||||
class RenameGroupDialog extends React.Component {
|
||||
|
||||
@@ -34,6 +36,9 @@ class RenameGroupDialog extends React.Component {
|
||||
seafileAPI.renameGroup(this.props.groupID, name).then((res)=> {
|
||||
that.props.loadGroup(this.props.groupID);
|
||||
that.props.onGroupChanged(res.data.id);
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
}
|
||||
this.setState({
|
||||
|
Reference in New Issue
Block a user