mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-08 13:25:17 +00:00
fix plugin call
This commit is contained in:
parent
6e5aad939c
commit
28a9b0e940
@ -254,7 +254,7 @@ class Engine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
storageService(_options) {
|
storageService(_options) {
|
||||||
this.registerModule('storage');
|
this.registerModule('storage', {plugins: this.plugins});
|
||||||
this.registerModule('ipfs');
|
this.registerModule('ipfs');
|
||||||
this.registerModule('swarm');
|
this.registerModule('swarm');
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
class Storage {
|
class Storage {
|
||||||
constructor(embark, _options){
|
constructor(embark, options){
|
||||||
this.embark = embark;
|
this.embark = embark;
|
||||||
this.storageConfig = embark.config.storageConfig;
|
this.storageConfig = embark.config.storageConfig;
|
||||||
|
this.plugins = options.plugins;
|
||||||
|
|
||||||
if (!this.storageConfig.enabled) return;
|
if (!this.storageConfig.enabled) return;
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ class Storage {
|
|||||||
this.embark.events.setCommandHandler('storage:upload', (cb) => {
|
this.embark.events.setCommandHandler('storage:upload', (cb) => {
|
||||||
let platform = self.storageConfig.upload.provider;
|
let platform = self.storageConfig.upload.provider;
|
||||||
|
|
||||||
let uploadCmds = self.embark.getPluginsProperty('uploadCmds', 'uploadCmds');
|
let uploadCmds = self.plugins.getPluginsProperty('uploadCmds', 'uploadCmds');
|
||||||
for (let uploadCmd of uploadCmds) {
|
for (let uploadCmd of uploadCmds) {
|
||||||
if (uploadCmd.cmd === platform) {
|
if (uploadCmd.cmd === platform) {
|
||||||
return uploadCmd.cb.call(uploadCmd.cb, cb);
|
return uploadCmd.cb.call(uploadCmd.cb, cb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user