mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Removed v2 calls from views (#7351)
This commit is contained in:
committed by
Matteo Pagliazzi
parent
58b9a08539
commit
425172daae
@@ -1,4 +1,4 @@
|
||||
import { authWithHeaders } from '../../middlewares/api-v3/auth';
|
||||
import { authWithHeaders, authWithSession } from '../../middlewares/api-v3/auth';
|
||||
import _ from 'lodash';
|
||||
import { model as Challenge } from '../../models/challenge';
|
||||
import {
|
||||
@@ -340,7 +340,7 @@ api.getChallenge = {
|
||||
api.exportChallengeCsv = {
|
||||
method: 'GET',
|
||||
url: '/challenges/:challengeId/export/csv',
|
||||
middlewares: [authWithHeaders()],
|
||||
middlewares: [authWithSession],
|
||||
async handler (req, res) {
|
||||
req.checkParams('challengeId', res.t('challengeIdRequired')).notEmpty().isUUID();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user