mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-21 12:49:11 +00:00
add api registration to plugin
This commit is contained in:
parent
f0645ba48e
commit
fc5d942439
@ -34,6 +34,7 @@ var Plugin = function(options) {
|
||||
this.logger = this._loggerObject; // Might get changed if we do intercept
|
||||
this.events = options.events;
|
||||
this.config = options.config;
|
||||
this.plugins = options.plugins;
|
||||
this.env = options.env;
|
||||
this.loaded = false;
|
||||
this.currentContext = options.context;
|
||||
@ -214,6 +215,11 @@ Plugin.prototype.registerAPICall = function(method, endpoint, cb) {
|
||||
this.pluginTypes.push('apiCalls');
|
||||
};
|
||||
|
||||
Plugin.prototype.registerAPICall = function(method, endpoint, cb) {
|
||||
this.apiCalls.push({method: method, endpoint: endpoint, cb: cb});
|
||||
this.pluginTypes.push('apiCalls');
|
||||
};
|
||||
|
||||
Plugin.prototype.runFilePipeline = function() {
|
||||
var self = this;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user