Skip to content

Commit 51410b2

Browse files
committed
style(server): corrected tabs being mixed with spaces
1 parent da61846 commit 51410b2

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

templates/express/config/dummydata.js

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
'use strict';
22

33
var mongoose = require('mongoose'),<% if(mongo && mongoPassportUser) { %>
4-
User = mongoose.model('User'),<% } %>
5-
Thing = mongoose.model('Thing');
4+
User = mongoose.model('User'),<% } %>
5+
Thing = mongoose.model('Thing');
66

77
/**
88
* Populate database with sample application data
99
*/
1010

1111
//Clear old things, then add things in
1212
Thing.find({}).remove(function() {
13-
Thing.create({
14-
name : 'HTML5 Boilerplate',
15-
info : 'HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.',
16-
awesomeness: 10
17-
}, {
18-
name : 'AngularJS',
19-
info : 'AngularJS is a toolset for building the framework most suited to your application development.',
20-
awesomeness: 10
21-
}, {
22-
name : 'Karma',
23-
info : 'Spectacular Test Runner for JavaScript.',
24-
awesomeness: 10
25-
}, {
26-
name : 'Express',
27-
info : 'Flexible and minimalist web application framework for node.js.',
28-
awesomeness: 10
29-
}, {
30-
name : 'MongoDB + Mongoose',
31-
info : 'An excellent document database. Combined with Mongoose to simplify adding validation and business logic.',
32-
awesomeness: 10
33-
}, function() {
34-
console.log('finished populating things');
35-
}
36-
);
13+
Thing.create({
14+
name : 'HTML5 Boilerplate',
15+
info : 'HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.',
16+
awesomeness: 10
17+
}, {
18+
name : 'AngularJS',
19+
info : 'AngularJS is a toolset for building the framework most suited to your application development.',
20+
awesomeness: 10
21+
}, {
22+
name : 'Karma',
23+
info : 'Spectacular Test Runner for JavaScript.',
24+
awesomeness: 10
25+
}, {
26+
name : 'Express',
27+
info : 'Flexible and minimalist web application framework for node.js.',
28+
awesomeness: 10
29+
}, {
30+
name : 'MongoDB + Mongoose',
31+
info : 'An excellent document database. Combined with Mongoose to simplify adding validation and business logic.',
32+
awesomeness: 10
33+
}, function() {
34+
console.log('finished populating things');
35+
}
36+
);
3737
});
3838
<% if(mongo && mongoPassportUser) { %>
3939
// Clear old users, then add a default user
4040
User.find({}).remove(function() {
41-
User.create({
42-
provider: 'local',
43-
name: 'Test User',
41+
User.create({
42+
provider: 'local',
43+
name: 'Test User',
4444
4545
password: 'test'
46-
}, function() {
47-
console.log('finished populating users');
48-
}
49-
);
46+
}, function() {41
47+
console.log('finished populating users');
48+
}
49+
);
5050
});
5151
<% } %>

templates/express/middleware.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ module.exports = {
1717
* Set a cookie for angular so it knows we have an http session
1818
*/
1919
setUserCookie: function(req, res, next) {
20-
if(req.user) {
21-
res.cookie('user', JSON.stringify(req.user.userInfo));
22-
}
23-
next();
24-
}
20+
if(req.user) {
21+
res.cookie('user', JSON.stringify(req.user.userInfo));
22+
}
23+
next();
24+
}
2525
};

0 commit comments

Comments
 (0)