Fixing slack import. (#2819)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
938caa061d
Коммит
f3fa435a1b
@@ -348,10 +348,9 @@ export default class Client {
|
||||
|
||||
importSlack = (fileData, success, error) => {
|
||||
request.
|
||||
post(`${this.getTeamsRoute()}/import_team`).
|
||||
post(`${this.getTeamNeededRoute()}/import_team`).
|
||||
set(this.defaultHeaders).
|
||||
type('application/json').
|
||||
accept('application/json').
|
||||
accept('application/octet-stream').
|
||||
send(fileData).
|
||||
end(this.handleResponse.bind(this, 'importSlack', success, error));
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@ class TeamImportTab extends React.Component {
|
||||
this.setState({status: 'fail', link: ''});
|
||||
}
|
||||
|
||||
onImportSuccess(data) {
|
||||
this.setState({status: 'done', link: 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(data)});
|
||||
onImportSuccess(data, res) {
|
||||
this.setState({status: 'done', link: 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(res.text)});
|
||||
}
|
||||
|
||||
doImportSlack(file) {
|
||||
@@ -167,4 +167,4 @@ TeamImportTab.propTypes = {
|
||||
intl: intlShape.isRequired
|
||||
};
|
||||
|
||||
export default injectIntl(TeamImportTab);
|
||||
export default injectIntl(TeamImportTab);
|
||||
|
||||
Ссылка в новой задаче
Block a user