PLT-2600/PLT-2770 Changed getPublicLink api call to return a proper JSON string (#2914)

* Removed unused channelId and userId parameters from web client getPublicLink method

* Changed getPublicLink api call to return a proper JSON string
Этот коммит содержится в:
Harrison Healey
2016-05-06 14:32:08 -04:00
коммит произвёл Corey Hulen
родитель 6c75662b82
Коммит e1cae3b15b
8 изменённых файлов: 28 добавлений и 25 удалений

Просмотреть файл

@@ -23,8 +23,6 @@ export default class GetPublicLinkModal extends React.Component {
this.state = {
show: false,
channelId: '',
userId: '',
filename: '',
link: ''
};
@@ -36,7 +34,7 @@ export default class GetPublicLinkModal extends React.Component {
componentDidUpdate(prevProps, prevState) {
if (this.state.show && !prevState.show) {
AsyncClient.getPublicLink(this.state.channelId, this.state.userId, this.state.filename, this.handlePublicLink);
AsyncClient.getPublicLink(this.state.filename, this.handlePublicLink);
}
}
@@ -53,8 +51,6 @@ export default class GetPublicLinkModal extends React.Component {
handleToggle(value, args) {
this.setState({
show: value,
channelId: args.channelId,
userId: args.userId,
filename: args.filename,
link: ''
});

Просмотреть файл

@@ -197,7 +197,7 @@ class ViewImageModal extends React.Component {
handleGetPublicLink() {
this.props.onModalDismissed();
GlobalActions.showGetPublicLinkModal(this.props.channelId, this.props.userId, this.props.filenames[this.state.imgId]);
GlobalActions.showGetPublicLinkModal(this.props.filenames[this.state.imgId]);
}
onMouseEnterImage() {