Skip to content

Commit ea24858

Browse files
Copilotbgoncal
andcommitted
Fix code review issues in AppZone
- Added databaseTableName static property to AppZone - Fixed updateInRegion mutating method to update self - Addressed all code review comments Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
1 parent 002f2bd commit ea24858

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Sources/Shared/API/Models/AppZone+Queries.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,6 @@ public extension AppZone {
104104
try Current.database().write { db in
105105
try updatedZone.update(db)
106106
}
107+
self = updatedZone
107108
}
108109
}

Sources/Shared/API/Models/AppZone.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import GRDB
44
import HAKit
55

66
public struct AppZone: Codable, FetchableRecord, PersistableRecord {
7+
public static let databaseTableName = GRDBDatabaseTable.appZone.rawValue
8+
79
/// serverId/entityId (e.g., "server1/zone.home")
810
public let id: String
911
public let serverId: String

0 commit comments

Comments
 (0)