Skip to content

Commit

Permalink
Merge pull request #185 from pratikkuikel/3.x
Browse files Browse the repository at this point in the history
Add deleteSiteLog method to delete the site's log
  • Loading branch information
jbrooksuk authored Nov 12, 2024
2 parents ec2c659 + e84f62d commit 1b7f1e9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ $site->installPhpMyAdmin($data);
$site->removePhpMyAdmin();
$site->changePHPVersion($version);
$site->siteLog();
$site->deleteSiteLog();
```

### Site Workers
Expand Down
12 changes: 12 additions & 0 deletions src/Actions/ManagesSites.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,4 +485,16 @@ public function siteLog($serverId, $siteId)
{
return $this->get("servers/$serverId/sites/$siteId/logs");
}

/**
* Remove the given site's log when the log formatting is single.
*
* @param int $serverId
* @param int $siteId
* @return void
*/
public function deleteSiteLog($serverId, $siteId)
{
return $this->delete("servers/$serverId/sites/$siteId/logs");
}
}
10 changes: 10 additions & 0 deletions src/Resources/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,4 +475,14 @@ public function siteLog()
{
return $this->forge->siteLog($this->serverId, $this->id);
}

/**
* Remove the log for this site.
*
* @return void
*/
public function deleteSiteLog()
{
return $this->forge->deleteSiteLog($this->serverId, $this->id);
}
}

0 comments on commit 1b7f1e9

Please sign in to comment.