Skip to content

Commit

Permalink
Fix missing 'variable' field to REST response
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Jul 9, 2024
1 parent 8b33418 commit ea9aa06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ data class ObservationDto(
/** Category of the observation (optional). */
val category: String?,

/** Unique identifier of the variable. */
val variable: String?,

/** Date or date-time of the observation. */
val observation_time: String?,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fun Observation.toDto(): ObservationDto = ObservationDto(
source = source,
topic = topic,
category = category,
variable = variable,
observation_time = observationTime.toString(),
period = if (observationTimeEnd != null) {
Duration.between(observationTime, observationTimeEnd).toString()
Expand Down

0 comments on commit ea9aa06

Please sign in to comment.