File tree 9 files changed +7
-55
lines changed
9 files changed +7
-55
lines changed Original file line number Diff line number Diff line change
1
+ /js/js-extra
Original file line number Diff line number Diff line change @@ -100,38 +100,3 @@ function addProviderRoute(providerName) {
100
100
101
101
// disconnect with existing profile
102
102
router . post ( '/disconnect/:providerName' , mustBeAuthenticated , disconnect . post ) ;
103
-
104
- /*
105
- router.get('/mail', function*(next) {
106
- require('lib/mailer').sendMail({
107
- from: 'iliakan@javascript .ru',
108
-
109
- subject: 'hello',
110
- text: 'hello world!'
111
- }, function() {
112
- console.log(arguments);
113
- });
114
- this.body = "test";
115
- });
116
- */
117
-
118
-
119
- /*if (err) return next(err);
120
- if (!user) { return res.redirect('/signin') }
121
- * res.redirect('/account');
122
- * }
123
- { successRedirect: '/auth/popup-success', failureRedirect: '/auth/popup-failure' })*/
124
-
125
- /*
126
-
127
- router.get('/popup-success', function*() {
128
- this.body = this.render('popup-success');
129
- });
130
-
131
- router.get('/popup-failure', function*() {
132
- var reason = this.session.messages ? this.session.messages[0] : '';
133
- delete this.session.messages;
134
-
135
- this.body = this.render('popup-failure', { reason: reason });
136
- });
137
- */
Original file line number Diff line number Diff line change @@ -18,9 +18,6 @@ module.exports = new LocalStrategy({
18
18
19
19
co ( function * ( ) {
20
20
21
- // @tyv UNCOMMENT SPINNER
22
- // yield function(callback) {};
23
-
24
21
if ( ! email ) throw new UserAuthError ( 'Укажите email.' ) ;
25
22
if ( ! password ) throw new UserAuthError ( 'Укажите пароль.' ) ;
26
23
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ block append variables
8
8
9
9
block content
10
10
11
- p Вы хотели бы получать уведомления по темам :
11
+ p Темы :
12
12
13
13
style .
14
14
.main ul > li :before {
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ schema.statics.findTree = function* (options) {
138
138
addPrevNext ( ) ;
139
139
140
140
return {
141
+ articles : articlesById ,
141
142
children : root ,
142
143
byId : function ( id ) {
143
144
if ( ! id ) return undefined ;
Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ UserSchema.methods.getProfileUrl = function() {
220
220
221
221
UserSchema . methods . checkPassword = function ( password ) {
222
222
if ( ! password ) return false ; // empty password means no login by password
223
+ if ( ! this . passwordHash ) return false ; // this user does not have password (the line below would hang!)
224
+
223
225
return hash . createHashSlow ( password , this . salt ) == this . passwordHash ;
224
226
} ;
225
227
Original file line number Diff line number Diff line change @@ -39,14 +39,6 @@ app.requireHandler('requestLog');
39
39
40
40
app . requireHandler ( 'nocache' ) ;
41
41
42
- /*
43
- app.id = Math.random();
44
- app.use(function*(next) {
45
- console.log(app.id);
46
- yield next;
47
- });
48
- */
49
-
50
42
//app.requireHandler('time');
51
43
52
44
// this middleware adds this.render method
@@ -92,13 +84,6 @@ app.requireHandler('flash');
92
84
93
85
app . requireHandler ( 'paymentsMethods' ) ;
94
86
95
- //app.requireHandler('sendMail');
96
-
97
- // right before endpoints
98
- // so that the error won't fall through the handlers above
99
- // all above ^^^ handlers can finish processing the usual way
100
- //app.requireHandler('throwFinish');
101
-
102
87
// ======== Endpoint services that actually generate something ==========
103
88
104
89
var endpoints = [ ] ;
Original file line number Diff line number Diff line change @@ -159,7 +159,8 @@ var webpackConfig = {
159
159
} ;
160
160
161
161
162
- if ( process . env . NODE_ENV != 'development' ) { // production, ebook
162
+ //if (process.env.NODE_ENV != 'development') { // production, ebook
163
+ if ( process . env . NODE_ENV == 'production' ) { // production, ebook
163
164
webpackConfig . plugins . push (
164
165
function clearBeforeRun ( ) {
165
166
function clear ( compiler , callback ) {
You can’t perform that action at this time.
0 commit comments