Skip to content

Commit

Permalink
Remove @accessible macro from SipiService
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone committed Mar 18, 2024
1 parent 715c644 commit 2bde84e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package org.knora.webapi.messages.v2.responder.valuemessages

import zio.*
import zio.ZIO

import java.time.Instant
import java.util.UUID
Expand Down Expand Up @@ -1143,8 +1143,13 @@ object ValueContentV2 {
metadata <- ingestState match {
case AssetIngestState.AssetIngested =>
val assetId = AssetId.unsafeFrom(internalFilename.substring(0, internalFilename.indexOf('.')))
SipiService.getFileMetadataFromDspIngest(Shortcode.unsafeFrom(shortcode), assetId).logError
case AssetIngestState.AssetInTemp => SipiService.getFileMetadataFromSipiTemp(internalFilename)
ZIO
.serviceWithZIO[SipiService](
_.getFileMetadataFromDspIngest(Shortcode.unsafeFrom(shortcode), assetId),
)
.logError
case AssetIngestState.AssetInTemp =>
ZIO.serviceWithZIO[SipiService](_.getFileMetadataFromSipiTemp(internalFilename))
}
} yield FileInfo(internalFilename, metadata)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package org.knora.webapi.store.iiif.api
import zio.*
import zio.json.DeriveJsonDecoder
import zio.json.JsonDecoder
import zio.macros.accessible
import zio.nio.file.Path

import org.knora.webapi.messages.store.sipimessages.*
Expand Down Expand Up @@ -60,7 +59,6 @@ object FileMetadataSipiResponse {
implicit val decoder: JsonDecoder[FileMetadataSipiResponse] = DeriveJsonDecoder.gen[FileMetadataSipiResponse]
}

@accessible
trait SipiService {

/**
Expand Down

0 comments on commit 2bde84e

Please sign in to comment.