always load users version field

This commit is contained in:
Phillip Thelen 2024-07-31 15:57:28 +02:00 committed by Sabe Jones
parent 2a2c1af7ba
commit aa6e536851

View file

@ -13,7 +13,7 @@ import { getLanguageFromUser } from '../libs/language';
const OFFICIAL_PLATFORMS = ['habitica-web', 'habitica-ios', 'habitica-android'];
const COMMUNITY_MANAGER_EMAIL = nconf.get('EMAILS_COMMUNITY_MANAGER_EMAIL');
const USER_FIELDS_ALWAYS_LOADED = ['_id', 'notifications', 'preferences', 'auth', 'flags', 'permissions'];
const USER_FIELDS_ALWAYS_LOADED = ['_id', '_v', 'notifications', 'preferences', 'auth', 'flags', 'permissions'];
function getUserFields (options, req) {
// A list of user fields that aren't needed for the route and are not loaded from the db.