Meteor.methods<ServerMethods>({
    async saveUserPreferences(settings) {
        const userId = Meteor.userId();
        if (!userId) {
            throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'saveUserPreferences' });