Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 8787f48

Browse files
Merge remote-tracking branch 'origin/master' into develop
2 parents 0a2741e + bf8218a commit 8787f48

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ENV API_PORT=3030
1818
# start the application in a autohealing cluster
1919
# NOTE: quick fix for server issues, restart api when reaching max of 300 MB Memory Usage (happens in conjunction with 100% CPU Usage)
2020
# TODO: find better way of dealing with that issue
21-
CMD NODE_ENV=production pm2 start server/index.js -n api --attach --max-memory-restart 300M
21+
CMD NODE_ENV=production pm2 start server/index.js -n api --attach --max-memory-restart 1024M
2222
# CMD NODE_ENV=production pm2 start server/index.js -n api -i 2 --attach
2323
# as we have issues with pm2 currently in conjunction with nuxt, we use the standard approach here
2424
# CMD NODE_ENV=production node server/index.js

server/hooks/create-excerpt.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const sanitizeOptions = {
1212
allowedAttributes: {
1313
a: ['href', 'class', 'target', 'data-*' , 'contenteditable'],
1414
span: ['contenteditable', 'class', 'data-*']
15-
},
15+
}
1616
};
1717

1818
module.exports = function (options = {}) { // eslint-disable-line no-unused-vars
@@ -36,10 +36,6 @@ module.exports = function (options = {}) { // eslint-disable-line no-unused-vars
3636
// we do need to compare the strings to decide if we really need to trim
3737
const contentBefore = trunc(content, 9999999999);
3838
const contentTruncated = trunc(contentSanitized, options.length);
39-
hook.app.debug('contentBefore');
40-
hook.app.debug(contentBefore.text.length);
41-
hook.app.debug('contentTruncated');
42-
hook.app.debug(contentTruncated.text.length);
4339

4440
// save meta key hasMore to indecate if there is more text then in the excerpt
4541
const hasMore = contentBefore.text.length > (contentTruncated.text.length + 20);
@@ -48,6 +44,7 @@ module.exports = function (options = {}) { // eslint-disable-line no-unused-vars
4844
// set excerpt
4945
setByDot(hook.data, `${options.field}Excerpt`, hasMore ? contentTruncated.html : content.replace(/(\ ){2,}/ig, ' '))
5046
} catch (err) {
47+
hook.app.error(err);
5148
throw new Error(err);
5249
}
5350
// trim content

server/services/comments/comments.hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const userSchema = {
2424
childField: '_id',
2525
query: {
2626
$limit: 1,
27-
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'thumbnails']
27+
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'termsAndConditionsAccepted', 'thumbnails']
2828
}
2929
}
3030
};

server/services/contributions/contributions.hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const userSchema = {
3131
childField: '_id',
3232
query: {
3333
$limit: 1,
34-
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'thumbnails']
34+
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'termsAndConditionsAccepted', 'thumbnails']
3535
}
3636
}
3737
};

server/services/notifications/notifications.hooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const commentSchema = {
2323
childField: '_id',
2424
query: {
2525
$limit: 1,
26-
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'thumbnails']
26+
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'termsAndConditionsAccepted', 'thumbnails']
2727
}
2828
}
2929
}
@@ -49,7 +49,7 @@ const userSchema = {
4949
childField: '_id',
5050
query: {
5151
$limit: 1,
52-
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'thumbnails']
52+
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'termsAndConditionsAccepted', 'thumbnails']
5353
}
5454
}
5555
};

server/services/organizations/organizations.hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const reviewerSchema = {
3737
childField: '_id',
3838
query: {
3939
$limit: 1,
40-
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'thumbnails']
40+
$select: ['_id', 'name', 'slug', 'avatar', 'lastActiveAt', 'termsAndConditionsAccepted', 'thumbnails']
4141
}
4242
}
4343
};

0 commit comments

Comments
 (0)