Skip to content

Commit 65f99fa

Browse files
committed
minor
1 parent 26d289f commit 65f99fa

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

handlers/auth/router.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ var router = module.exports = new Router();
2222
router.post('/login/local', function*(next) {
2323
var ctx = this;
2424

25-
2625
// @see node_modules/koa-passport/lib/framework/koa.js for passport.authenticate
2726
// it returns the middleware to delegate
2827
var middleware = passport.authenticate('local', function*(err, user, info) {
@@ -34,7 +33,7 @@ router.post('/login/local', function*(next) {
3433
ctx.body = info;
3534
} else {
3635
yield ctx.login(user);
37-
yield ctx.rememberMe();
36+
yield* ctx.rememberMe();
3837
ctx.body = {user: user.getInfoFields() };
3938
}
4039
});

handlers/courses/controller/coursesByUser.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ exports.get = function*(next) {
9090
});
9191
}
9292

93-
94-
if (this.isAdmin || groups[i].teacher.equals(this.user.id)) {
95-
groupInfo.links.push({
96-
url: `/courses/groups/${group.slug}/participants-info`,
97-
title: 'Анкеты участников'
98-
});
99-
}
100-
10193
groupInfo.status = (groupInfo.dateStart > new Date()) ? 'accepted' :
10294
(groupInfo.dateEnd > new Date()) ? 'started' : 'ended';
10395

@@ -137,8 +129,12 @@ exports.get = function*(next) {
137129
}, {
138130
url: `/courses/groups/${group.slug}/materials`,
139131
title: 'Материалы для обучения'
132+
}, {
133+
url: `/courses/groups/${group.slug}/participants-info`,
134+
title: 'Анкеты участников'
140135
}];
141136

137+
142138
groupInfo.status = (groupInfo.dateStart > new Date()) ? 'accepted' :
143139
(groupInfo.dateEnd > new Date()) ? 'started' : 'ended';
144140

modules/config/mailer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ module.exports = {
3939
fromEmail: '[email protected]',
4040
fromName: 'Степан Суворов (JavaScript.ru)',
4141
signature: "<em>Успешной разработки!<br>Степан Суворов</em>"
42+
},
43+
inepipenko: {
44+
fromEmail: '[email protected]',
45+
fromName: 'Игорь Непипенко (JavaScript.ru)',
46+
signature: "<em>Успешной разработки!<br>Игорь Непипенко</em>"
4247
}
4348
},
4449
mandrill: {

0 commit comments

Comments
 (0)