diff --git a/frontend/src/components/dirent-list-view/dirent-list-item.js b/frontend/src/components/dirent-list-view/dirent-list-item.js index c0d38820e2..30f49eacc1 100644 --- a/frontend/src/components/dirent-list-view/dirent-list-item.js +++ b/frontend/src/components/dirent-list-view/dirent-list-item.js @@ -111,7 +111,7 @@ class DirentListItem extends React.Component { let filePath = this.getDirentPath(dirent); if (dirent.starred) { - seafileAPI.unStarItem(repoID, filePath).then(() => { + seafileAPI.unstarItem(repoID, filePath).then(() => { this.props.updateDirent(this.props.dirent, 'starred', false); }); } else { diff --git a/frontend/src/components/file-view/file-view.js b/frontend/src/components/file-view/file-view.js index c61d264e28..bab8e58bed 100644 --- a/frontend/src/components/file-view/file-view.js +++ b/frontend/src/components/file-view/file-view.js @@ -37,7 +37,7 @@ class FileView extends React.Component { toggleStar = () => { if (this.state.isStarred) { - seafileAPI.unStarItem(repoID, filePath).then((res) => { + seafileAPI.unstarItem(repoID, filePath).then((res) => { this.setState({ isStarred: false }); diff --git a/frontend/src/components/shared-repo-list-view/shared-repo-list-item.js b/frontend/src/components/shared-repo-list-view/shared-repo-list-item.js index f325632104..c40eac2246 100644 --- a/frontend/src/components/shared-repo-list-view/shared-repo-list-item.js +++ b/frontend/src/components/shared-repo-list-view/shared-repo-list-item.js @@ -327,7 +327,7 @@ class SharedRepoListItem extends React.Component { onStarRepo = () => { if (this.state.isStarred) { - seafileAPI.unStarItem(this.props.repo.repo_id, '/').then(() => { + seafileAPI.unstarItem(this.props.repo.repo_id, '/').then(() => { this.setState({isStarred: !this.state.isStarred}); }); } else { diff --git a/frontend/src/markdown-editor.js b/frontend/src/markdown-editor.js index c3107668fa..176d784ceb 100644 --- a/frontend/src/markdown-editor.js +++ b/frontend/src/markdown-editor.js @@ -62,9 +62,9 @@ class EditorUtilities { ); } - unStarItem () { + unstarItem () { return ( - seafileAPI.unStarItem(this.repoID, this.filePath) + seafileAPI.unstarItem(this.repoID, this.filePath) ); } @@ -650,7 +650,7 @@ class MarkdownEditor extends React.Component { toggleStar = () => { let starrd = this.state.fileInfo.starred; if (starrd) { - editorUtilities.unStarItem().then((response) => { + editorUtilities.unstarItem().then((response) => { this.setState({ fileInfo: Object.assign({}, this.state.fileInfo, {starred: !starrd}) }); diff --git a/frontend/src/pages/my-libs/mylib-repo-list-item.js b/frontend/src/pages/my-libs/mylib-repo-list-item.js index 9021e48b93..39da47cae8 100644 --- a/frontend/src/pages/my-libs/mylib-repo-list-item.js +++ b/frontend/src/pages/my-libs/mylib-repo-list-item.js @@ -107,7 +107,7 @@ class MylibRepoListItem extends React.Component { onStarRepo = () => { if (this.state.isStarred) { - seafileAPI.unStarItem(this.props.repo.repo_id, '/').then(() => { + seafileAPI.unstarItem(this.props.repo.repo_id, '/').then(() => { this.setState({isStarred: !this.state.isStarred}); }); } else { diff --git a/frontend/src/pages/shared-libs/shared-libs.js b/frontend/src/pages/shared-libs/shared-libs.js index c7813333a5..0dc581ff49 100644 --- a/frontend/src/pages/shared-libs/shared-libs.js +++ b/frontend/src/pages/shared-libs/shared-libs.js @@ -181,7 +181,7 @@ class Item extends Component { onStarRepo = () => { if (this.state.isStarred) { - seafileAPI.unStarItem(this.props.data.repo_id, '/').then(() => { + seafileAPI.unstarItem(this.props.data.repo_id, '/').then(() => { this.setState({isStarred: !this.state.isStarred}); }); } else { diff --git a/frontend/src/pages/starred/starred.js b/frontend/src/pages/starred/starred.js index 65fd650d4a..447ec25100 100644 --- a/frontend/src/pages/starred/starred.js +++ b/frontend/src/pages/starred/starred.js @@ -143,7 +143,7 @@ class Item extends Component { e.preventDefault(); const data = this.props.data; - seafileAPI.unStarItem(data.repo_id, data.path).then((res) => { + seafileAPI.unstarItem(data.repo_id, data.path).then((res) => { this.setState({ unstarred: true });