RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/lib/fetchFeatures.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { CachedCollectionManager } from '../../app/ui-cached-collection/client';
import { sdk } from '../../app/utils/client/lib/SDKClient';

export const fetchFeatures = (): Promise<string[]> =>
    new Promise((resolve, reject) => {
        CachedCollectionManager.onLogin(() => {
            sdk.call('license:getModules').then(resolve, reject);
        });
    });