Skip to content

Commit

Permalink
add deleteSiteLog method to delete the site's log
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikkuikel committed Oct 23, 2024
1 parent 810282c commit e84f62d
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 e84f62d

Please sign in to comment.