mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 17:21:04 +00:00
fix(models): update sorting of scheduled database backups to order by creation date instead of name
This commit is contained in:
@@ -12,12 +12,12 @@ class ScheduledDatabaseBackup extends BaseModel
|
|||||||
|
|
||||||
public static function ownedByCurrentTeam()
|
public static function ownedByCurrentTeam()
|
||||||
{
|
{
|
||||||
return ScheduledDatabaseBackup::whereRelation('team', 'id', currentTeam()->id)->orderBy('name');
|
return ScheduledDatabaseBackup::whereRelation('team', 'id', currentTeam()->id)->orderBy('created_at', 'desc');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function ownedByCurrentTeamAPI(int $teamId)
|
public static function ownedByCurrentTeamAPI(int $teamId)
|
||||||
{
|
{
|
||||||
return ScheduledDatabaseBackup::whereRelation('team', 'id', $teamId)->orderBy('name');
|
return ScheduledDatabaseBackup::whereRelation('team', 'id', $teamId)->orderBy('created_at', 'desc');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function team()
|
public function team()
|
||||||
|
|||||||
Reference in New Issue
Block a user