Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 5ff49a7

Browse files
committed
Fixing article and express 4 modification
1 parent 36acc48 commit 5ff49a7

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

app/routes/core.server.routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
module.exports = function(app) {
44
// Root routing
55
var core = require('../../app/controllers/core.server.controller');
6-
app.get('/', core.index);
6+
app.route('/').get(core.index);
77
};

app/routes/users.server.routes.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,38 @@ var passport = require('passport');
88
module.exports = function(app) {
99
// User Routes
1010
var users = require('../../app/controllers/users.server.controller');
11-
app.get('/users/me', users.me);
12-
app.put('/users', users.update);
13-
app.post('/users/password', users.changePassword);
14-
app.del('/users/accounts', users.removeOAuthProvider);
11+
app.route('/users/me').get(users.me);
12+
app.route('/users').put(users.update);
13+
app.route('/users/password').post(users.changePassword);
14+
app.route('/users/accounts').delete(users.removeOAuthProvider);
1515

1616
// Setting up the users api
17-
app.post('/auth/signup', users.signup);
18-
app.post('/auth/signin', users.signin);
19-
app.get('/auth/signout', users.signout);
17+
app.route('/auth/signup').post(users.signup);
18+
app.route('/auth/signin').post(users.signin);
19+
app.route('/auth/signout').get(users.signout);
2020

2121
// Setting the facebook oauth routes
22-
app.get('/auth/facebook', passport.authenticate('facebook', {
22+
app.route('/auth/facebook').get(passport.authenticate('facebook', {
2323
scope: ['email']
2424
}));
25-
app.get('/auth/facebook/callback', users.oauthCallback('facebook'));
25+
app.route('/auth/facebook/callback').get(users.oauthCallback('facebook'));
2626

2727
// Setting the twitter oauth routes
28-
app.get('/auth/twitter', passport.authenticate('twitter'));
29-
app.get('/auth/twitter/callback', users.oauthCallback('twitter'));
28+
app.route('/auth/twitter').get(passport.authenticate('twitter'));
29+
app.route('/auth/twitter/callback').get(users.oauthCallback('twitter'));
3030

3131
// Setting the google oauth routes
32-
app.get('/auth/google', passport.authenticate('google', {
32+
app.route('/auth/google').get(passport.authenticate('google', {
3333
scope: [
3434
'https://www.googleapis.com/auth/userinfo.profile',
3535
'https://www.googleapis.com/auth/userinfo.email'
3636
]
3737
}));
38-
app.get('/auth/google/callback', users.oauthCallback('google'));
38+
app.route('/auth/google/callback').get(users.oauthCallback('google'));
3939

4040
// Setting the linkedin oauth routes
41-
app.get('/auth/linkedin', passport.authenticate('linkedin'));
42-
app.get('/auth/linkedin/callback', users.oauthCallback('linkedin'));
41+
app.route('/auth/linkedin').get(passport.authenticate('linkedin'));
42+
app.route('/auth/linkedin/callback').get(users.oauthCallback('linkedin'));
4343

4444
// Finish by binding the user middleware
4545
app.param('userId', users.userByID);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"postinstall": "bower install --config.interactive=false"
1919
},
2020
"dependencies": {
21-
"express": "~4.0.0",
21+
"express": "~4.1.0",
2222
"express-session": "~1.0.2",
2323
"body-parser": "~1.0.1",
2424
"cookie-parser": "~1.0.1",

public/modules/articles/views/view-article.client.view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h1>{{article.title}}</h1>
44
</div>
55

6-
<div class="pull-right" data-ng-show="authentication.user._id == article.user._id || true">
6+
<div class="pull-right" data-ng-show="authentication.user._id == article.user._id">
77
<a class="btn btn-primary" href="/#!/articles/{{article._id}}/edit">
88
<i class="glyphicon glyphicon-edit"></i>
99
</a>

0 commit comments

Comments
 (0)