Skip to content

Commit

Permalink
Endre navn på responsobjekt.
Browse files Browse the repository at this point in the history
  • Loading branch information
henriwi committed Sep 12, 2024
1 parent 5cda8f6 commit 44b85bd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ data class AvlopKodeResponse(val data: AvlopKode, val metadata: RegisterMetadata
data class EnergikildeResponse(val data: EnergikildeKode, val metadata: RegisterMetadataResponse)

@Serializable
data class OppvarmingDTO(val data: OppvarmingKode, val metadata: RegisterMetadataResponse)
data class OppvarmingResponse(val data: OppvarmingKode, val metadata: RegisterMetadataResponse)

@Serializable
data class BruksenhetResponse(
val bruksenhetId: Long,
val bruksareal: BruksarealResponse? = null,
val energikilder: List<EnergikildeResponse> = emptyList(),
val oppvarminger: List<OppvarmingDTO> = emptyList(),
val oppvarminger: List<OppvarmingResponse> = emptyList(),
)

fun Bygning.toBygningResponse(): BygningResponse = BygningResponse(
Expand Down Expand Up @@ -108,7 +108,7 @@ private fun Energikilde.toEnergikildeResponse() = EnergikildeResponse(
)
)

private fun Oppvarming.toOppvarmingResponse() = OppvarmingDTO(
private fun Oppvarming.toOppvarmingResponse() = OppvarmingResponse(
data = this.data,
metadata = RegisterMetadataResponse(
registreringsTidspunkt = metadata.registreringstidspunkt
Expand Down

0 comments on commit 44b85bd

Please sign in to comment.