fix: url required issue.

This commit is contained in:
aminecmi 2023-03-03 20:39:33 +01:00
parent f28cb759df
commit f72ef2f5d4
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class SelfossModel {
)
@Serializable
data class SourceParams(
val url: String?
val url: String? = null
)
@Serializable
data class Item(

View File

@ -20,7 +20,7 @@ fun SOURCE.toView(): SelfossModel.Source =
this.spout,
this.error,
this.icon,
SelfossModel.SourceParams(this.url)
if (this.url != null) SelfossModel.SourceParams(this.url) else null
)
fun SelfossModel.Source.toEntity(): SOURCE =