mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-04 13:09:41 +00:00
Removed cron from every route
This commit is contained in:
parent
db0b0d6b6d
commit
137636cb40
2 changed files with 0 additions and 5 deletions
|
|
@ -343,7 +343,6 @@ api.getGroups = {
|
|||
api.getGroup = {
|
||||
method: 'GET',
|
||||
url: '/groups/:groupId',
|
||||
runCron: false, // Do not run cron to avoid double cronning because it's called in parallel to GET /user when the site loads
|
||||
middlewares: [authWithHeaders()],
|
||||
async handler (req, res) {
|
||||
let user = res.locals.user;
|
||||
|
|
|
|||
|
|
@ -27,10 +27,6 @@ module.exports.readController = function readController (router, controller) {
|
|||
let middlewaresToAdd = [getUserLanguage];
|
||||
|
||||
if (authMiddlewareIndex !== -1) { // the user will be authenticated, getUserLanguage and cron after authentication
|
||||
if (!(runCron === false)) { // eslint-disable-line no-extra-parens
|
||||
middlewaresToAdd.push(cron);
|
||||
}
|
||||
|
||||
if (authMiddlewareIndex === middlewares.length - 1) {
|
||||
middlewares.push(...middlewaresToAdd);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue