Skip to content

Commit

Permalink
Remove moduleKey usage, fix license check
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Apr 1, 2021
1 parent 5984e36 commit a1cd67b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion examples/api/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
},
"name": "",
"code": "Frosh33641717512",
"moduleKey": "",
"lifecycleStatus": {
"id": 1,
"name": "created",
Expand Down
5 changes: 2 additions & 3 deletions src/Components/SBP/Components/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public function getPlugin(string $name): Plugin
$plugins = $this->getPlugins($name);

foreach ($plugins as $plugin) {
if (strtolower($name) === strtolower($plugin->moduleKey)) {
return $plugin;
if (strtolower($name) === strtolower($plugin->name)) {
return $this->client->Plugins()->get($plugin->id);
}
}

Expand All @@ -60,7 +60,6 @@ public function createPlugin(string $name, string $generation): Plugin

$createdPlugin = Plugin::map(json_decode($plugin));
$createdPlugin->name = $name;
$createdPlugin->moduleKey = $name;

return $this->client->Plugins()->put($createdPlugin->id, $createdPlugin);
}
Expand Down
3 changes: 0 additions & 3 deletions src/Structs/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ class Plugin extends Struct
/** @var string */
public $code;

/** @var string */
public $moduleKey;

/** @var LifecycleStatus */
public $lifecycleStatus;

Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
},
"name": "FroshPlatformThumbnailProcessor",
"code": "Frosh69611263569",
"moduleKey": "FroshPlatformThumbnailProcessor",
"lifecycleStatus": {
"id": 5,
"name": "readyforstore",
Expand Down

0 comments on commit a1cd67b

Please sign in to comment.