mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
fix(cache): explicitly disable caching for most api routes
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import _ from 'lodash';
|
||||
import { query } from 'express-validator/check';
|
||||
import { langCodes } from '../../libs/i18n';
|
||||
import apiError from '../../libs/apiError';
|
||||
import common from '../../../common';
|
||||
@@ -55,12 +54,9 @@ function _deleteOtherPlatformsAnswers (faqObject, platform) {
|
||||
api.faq = {
|
||||
method: 'GET',
|
||||
url: '/faq',
|
||||
middlewares: [
|
||||
query('platform')
|
||||
.optional()
|
||||
.isIn(['web', 'android', 'ios']).withMessage(apiError('invalidPlatform')),
|
||||
],
|
||||
async handler (req, res) {
|
||||
req.checkQuery('platform').optional().isIn(['web', 'android', 'ios'], apiError('guildsPaginateBooleanString'));
|
||||
|
||||
const validationErrors = req.validationErrors();
|
||||
if (validationErrors) throw validationErrors;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user