Skip to content

Commit ce7ba74

Browse files
committed
Make data nullable for compatibility.
1 parent 136885c commit ce7ba74

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/kotlin/no/nav/klage/document/api/views/DocumentUpdateInput.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ package no.nav.klage.document.api.views
22

33
data class DocumentUpdateInput(
44
val json: String,
5-
val data: String,
5+
val data: String?,
66
val currentVersion: Int?,
77
)

src/main/kotlin/no/nav/klage/document/service/DocumentService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DocumentService(
3131
private val secureLogger = getSecureLogger()
3232
}
3333

34-
fun createDocument(json: String, data: String): DocumentVersion {
34+
fun createDocument(json: String, data: String?): DocumentVersion {
3535
val now = LocalDateTime.now()
3636

3737
val document = documentRepository.save(
@@ -54,7 +54,7 @@ class DocumentService(
5454
)
5555
}
5656

57-
fun updateDocument(documentId: UUID, json: String, data: String, currentVersion: Int?): DocumentVersion {
57+
fun updateDocument(documentId: UUID, json: String, data: String?, currentVersion: Int?): DocumentVersion {
5858
val now = LocalDateTime.now()
5959
val latestVersionNumber = latestDocumentRepository.findById(documentId).get().currentVersion
6060

0 commit comments

Comments
 (0)