Skip to content

Commit 73236af

Browse files
committed
[#1804] update variable names, remove server-side routes
1 parent 8aeaa38 commit 73236af

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

client/modules/User/pages/DashboardView.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class DashboardView extends React.Component {
3232
this.gotoHomePage = this.gotoHomePage.bind(this);
3333
this.toggleCollectionCreate = this.toggleCollectionCreate.bind(this);
3434
this.state = {
35-
isCollectionCreate: false
35+
collectionCreateVisible: false
3636
};
3737
}
3838

@@ -74,7 +74,7 @@ class DashboardView extends React.Component {
7474

7575
toggleCollectionCreate() {
7676
this.setState((prevState) => ({
77-
isCollectionCreate: !prevState.isCollectionCreate
77+
collectionCreateVisible: !prevState.collectionCreateVisible
7878
}));
7979
}
8080

@@ -149,7 +149,7 @@ class DashboardView extends React.Component {
149149
{this.renderContent(currentTab, username)}
150150
</div>
151151
</main>
152-
{this.state.isCollectionCreate && (
152+
{this.state.collectionCreateVisible && (
153153
<Overlay
154154
title={this.props.t('DashboardView.CreateCollectionOverlay')}
155155
closeOverlay={this.toggleCollectionCreate}

server/routes/server.routes.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,6 @@ router.get('/about', (req, res) => {
121121
res.send(renderIndex());
122122
});
123123

124-
router.get('/:username/collections/create', (req, res) => {
125-
userExists(req.params.username, (exists) => {
126-
const isLoggedInUser =
127-
req.user && req.user.username === req.params.username;
128-
const canAccess = exists && isLoggedInUser;
129-
return canAccess
130-
? res.send(renderIndex())
131-
: get404Sketch((html) => res.send(html));
132-
});
133-
});
134-
135-
router.get('/:username/collections/create', (req, res) => {
136-
userExists(req.params.username, (exists) =>
137-
exists ? res.send(renderIndex()) : get404Sketch((html) => res.send(html))
138-
);
139-
});
140-
141124
router.get('/:username/collections/:id', (req, res) => {
142125
collectionForUserExists(req.params.username, req.params.id, (exists) =>
143126
exists ? res.send(renderIndex()) : get404Sketch((html) => res.send(html))

0 commit comments

Comments
 (0)