mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Cache username autocomplete requests
This commit is contained in:
@@ -8,6 +8,7 @@ api.getUsernameAutocompletes = {
|
||||
url: '/members/find/:username',
|
||||
middlewares: [],
|
||||
async handler (req, res) {
|
||||
res.set('Cache-Control', 'public, max-age=300000'); // 5 minutes
|
||||
req.checkParams('username', res.t('invalidReqParams')).notEmpty();
|
||||
|
||||
let validationErrors = req.validationErrors();
|
||||
|
||||
Reference in New Issue
Block a user