Skip to content

Commit

Permalink
eux-pdf-flattener
Browse files Browse the repository at this point in the history
  • Loading branch information
walberg committed Aug 4, 2024
1 parent 2a2c8ab commit acc8ed6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package no.nav.eux.pdf.webapp

import no.nav.eux.pdf.openapi.api.PdfApi
import no.nav.eux.pdf.service.FlattenPdfService
import no.nav.security.token.support.core.api.Protected
import org.springframework.core.io.ByteArrayResource
import org.springframework.core.io.Resource
import org.springframework.http.ResponseEntity
Expand All @@ -12,6 +13,7 @@ class PdfApiImpl(
val pdfService: FlattenPdfService
) : PdfApi {

@Protected
override fun flattenPdf(file: Resource?): ResponseEntity<Resource> {
return ByteArrayResource(pdfService.flattenPdf(file!!.contentAsByteArray)).toOkResponseEntity()
}
Expand Down

0 comments on commit acc8ed6

Please sign in to comment.