Skip to content

Commit

Permalink
Merge branch 'refs/heads/0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
csavelief committed Jun 28, 2024
2 parents 5645ed6 + 5ea4c70 commit 18b704b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions app/Models/YnhServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,34 @@ public function pullServerInfos(?string $uid = null, ?User $user = null): void
'updated' => true,
]);
}

// Add two specific apps, the SSH and the SFTP, that are not packaged apps.
// Deal with them as if they were.
YnhApplication::updateOrCreate([
'ynh_server_id' => $this->id,
'sku' => 'ssh',
], [
'name' => 'ssh',
'description' => null,
'version' => 'shadow',
'path' => null,
'sku' => 'ssh',
'ynh_server_id' => $this->id,
'updated' => true,
]);
YnhApplication::updateOrCreate([
'ynh_server_id' => $this->id,
'sku' => 'sftp',
], [
'name' => 'sftp',
'description' => null,
'version' => 'shadow',
'path' => null,
'sku' => 'sftp',
'ynh_server_id' => $this->id,
'updated' => true,
]);

DB::transaction(function () {
YnhApplication::where('ynh_server_id', $this->id)
->where('updated', false)
Expand Down

0 comments on commit 18b704b

Please sign in to comment.