mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Revert query optimization (#9636)
This commit is contained in:
@@ -262,7 +262,7 @@ api.createChallengeTasks = {
|
|||||||
api.getUserTasks = {
|
api.getUserTasks = {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: '/tasks/user',
|
url: '/tasks/user',
|
||||||
middlewares: [authWithHeaders(false, '_id preferences tasksOrder')],
|
middlewares: [authWithHeaders()],
|
||||||
async handler (req, res) {
|
async handler (req, res) {
|
||||||
let types = Tasks.tasksTypes.map(type => `${type}s`);
|
let types = Tasks.tasksTypes.map(type => `${type}s`);
|
||||||
types.push('completedTodos', '_allCompletedTodos'); // _allCompletedTodos is currently in BETA and is likely to be removed in future
|
types.push('completedTodos', '_allCompletedTodos'); // _allCompletedTodos is currently in BETA and is likely to be removed in future
|
||||||
@@ -517,7 +517,7 @@ api.updateTask = {
|
|||||||
api.scoreTask = {
|
api.scoreTask = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/tasks/:taskId/score/:direction',
|
url: '/tasks/:taskId/score/:direction',
|
||||||
middlewares: [authWithHeaders(false, '_id stats profile preferences tasksOrder _ABtests webhooks party guilds items flags')],
|
middlewares: [authWithHeaders()],
|
||||||
async handler (req, res) {
|
async handler (req, res) {
|
||||||
req.checkParams('direction', res.t('directionUpDown')).notEmpty().isIn(['up', 'down']);
|
req.checkParams('direction', res.t('directionUpDown')).notEmpty().isIn(['up', 'down']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user