Merge pull request #739 from ParsePlatform/peterjs.featuresEndpoint

Features Endpoint for Dashboard.
This commit is contained in:
Drew
2016-03-01 15:08:15 -08:00
7 changed files with 184 additions and 2 deletions

View File

@@ -18,8 +18,12 @@ export class AdaptableController {
this.options = options;
this.appId = appId;
this.adapter = adapter;
this.setFeature();
}
// sets features for Dashboard to consume from features router
setFeature() {}
set adapter(adapter) {
this.validateAdapter(adapter);
this[_adapter] = adapter;
@@ -67,4 +71,4 @@ export class AdaptableController {
}
}
export default AdaptableController;
export default AdaptableController;

View File

@@ -3,9 +3,16 @@ import PromiseRouter from '../PromiseRouter';
import rest from '../rest';
import AdaptableController from './AdaptableController';
import { PushAdapter } from '../Adapters/Push/PushAdapter';
import features from '../features';
const FEATURE_NAME = 'push';
export class PushController extends AdaptableController {
setFeature() {
features.setFeature(FEATURE_NAME, this.adapter.feature || {});
}
/**
* Check whether the deviceType parameter in qury condition is valid or not.
* @param {Object} where A query condition