Skip to content

Commit 170ab62

Browse files
authored
Update Plugin.php
1 parent 5e0bb31 commit 170ab62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Kong/Services/Plugin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ public function update($api, $plugin, $body = [])
3434
{
3535
$url = $api ? '/apis/'.$api.'/plugins/'.$plugin : '/apis/plugins/'.$plugin;
3636

37-
return $this->client->post($url, ['body' => $body]);
37+
return $this->client->patch($url, ['body' => $body]);
3838
}
3939

4040
public function updateOrCreate($api = '', $body = [])
4141
{
4242
$url = $api ? '/apis/'.$api.'/plugins/' : '/apis/plugins/';
4343

44-
return $this->client->post($url, ['body' => $body]);
44+
return $this->client->put($url, ['body' => $body]);
4545
}
4646

4747
public function delete($api, $plugin)
4848
{
4949
$url = $api ? '/apis/'.$api.'/plugins/'.$plugin : '/apis/plugins/'.$plugin;
5050

51-
return $this->client->post($url);
51+
return $this->client->delete($url);
5252
}
5353

5454
public function enabled()
@@ -58,6 +58,6 @@ public function enabled()
5858

5959
public function schema($plugin)
6060
{
61-
return $this->client->post('/plugins/schema/'.$plugin);
61+
return $this->client->get('/plugins/schema/'.$plugin);
6262
}
6363
}

0 commit comments

Comments
 (0)