Skip to content

Commit

Permalink
Remove ownerEmail from LOIs. (#2574)
Browse files Browse the repository at this point in the history
  • Loading branch information
sufyanAbbasi authored Jul 25, 2024
1 parent ba3a946 commit e3776d2
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ data class LocationOfInterest(
val geometry: Geometry,
/** The number of submissions that have been made for this LOI. */
val submissionCount: Int = 0,
/**
* The email of the owner of this LOI, set to the current user's email when an LOI is created by
* the user.
*/
// TODO(#2573): Remove (email is deprecated for PII reasons).
val ownerEmail: String? = null,
/** Custom map of properties for this LOI. Corresponds to the properties field in GeoJSON */
val properties: LoiProperties = mapOf(),
/** Whether the LOI was predefined in the survey or not (i.e. added ad hoc). */
Expand All @@ -77,7 +71,6 @@ data class LocationOfInterest(
clientTimestamp = lastModified.clientTimestamp,
geometry = geometry,
submissionCount = submissionCount,
ownerEmail = ownerEmail,
properties = properties,
isPredefined = isPredefined,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data class LocationOfInterestMutation(
val customId: String = "",
val geometry: Geometry? = null,
val submissionCount: Int = 0,
val ownerEmail: String? = null,
val properties: LoiProperties = mapOf(),
val isPredefined: Boolean? = null,
) : Mutation()
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ fun LocationOfInterest.toLocalDataStoreObject() =
geometry = geometry.toLocalDataStoreObject(),
customId = customId,
submissionCount = submissionCount,
ownerEmail = ownerEmail,
properties = properties,
isPredefined = isPredefined,
)
Expand Down Expand Up @@ -197,7 +196,6 @@ fun LocationOfInterestMutation.toLocalDataStoreObject(user: User): LocationOfInt
geometry = geometry?.toLocalDataStoreObject(),
customId = customId,
submissionCount = submissionCount,
ownerEmail = ownerEmail,
properties = properties,
isPredefined = isPredefined,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ data class LocationOfInterestEntity(
val geometry: GeometryWrapper?,
val customId: String,
val submissionCount: Int,
val ownerEmail: String?,
val properties: LoiProperties,
val isPredefined: Boolean?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ object LoiConverter {
// TODO(#929): Set geometry once LOI has been updated to use our own model.
geometry = geometry,
submissionCount = submissionCount,
ownerEmail = created.user.displayName,
properties = properties,
isPredefined = isPredefined,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ constructor(
locationOfInterestId = newId,
userId = user.id,
geometry = geometry,
ownerEmail = user.email,
properties = generateProperties(loiName),
isPredefined = false,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ class LoiConverterTest {
lastModified = AuditInfo(user = USER, Date(987654321L * 1000), Date(9876543210L * 1000)),
geometry = Point(coordinates = Coordinates(1.0, 2.0)),
submissionCount = 1,
ownerEmail = USER.displayName,
properties = mapOf("property1" to "value1", "property2" to 123.0),
isPredefined = true,
),
Expand Down

0 comments on commit e3776d2

Please sign in to comment.