Skip to content

Commit

Permalink
Fix NavAbilityOnPremBlobStore
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Dec 9, 2024
1 parent 4a7773a commit f161b2d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/services/BlobStore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ function DFG.addBlob!(store::NavAbilityOnPremBlobStore, blobId::UUID, blob::Vect
response = NvaSDK.GQL.mutate(
store.client,
"addBlobFS",
Dict("blobId" => string(blobId), "input" => b64blob);
Dict("storeLabel" => string(store.label), "blobId" => string(blobId), "input" => b64blob);
throw_on_execution_error = true,
)
blobId_str = response.data["addBlobFS"]
Expand All @@ -352,14 +352,18 @@ function DFG.addBlob!(store::NavAbilityOnPremBlobStore, blobId::UUID, blob::Vect
end

GQL_GET_BLOB = GQL.gql"""
query getBlob($id: String!) {
getBlob(blobId: $id)
query getBlob($id: String!, $storeLabel: String = "default") {
getBlob(blobId: $id, storeLabel: $storeLabel)
}
"""

function DFG.getBlob(store::NavAbilityOnPremBlobStore, blobId::UUID)

response = executeGql(store.client, GQL_GET_BLOB, (id = string(blobId),))
response = executeGql(
store.client,
GQL_GET_BLOB,
(id = string(blobId), storeLabel = string(store.label))
)

return base64decode(response.data["getBlob"])
end

0 comments on commit f161b2d

Please sign in to comment.