diff --git a/lib/facts/blob-service.js b/lib/facts/blob-service.js --- a/lib/facts/blob-service.js +++ b/lib/facts/blob-service.js @@ -1,5 +1,7 @@ // @flow +import { isDev } from '../utils/dev-utils.js'; + type BlobServicePath = '/blob/:blobHash' | '/blob'; export type BlobServiceHTTPEndpoint = { @@ -7,6 +9,11 @@ +method: 'GET' | 'POST' | 'PUT' | 'DELETE', }; +type BlobServiceConfig = { + +url: string, + +httpEndpoints: { +[endpoint: string]: BlobServiceHTTPEndpoint }, +}; + const httpEndpoints = Object.freeze({ GET_BLOB: { path: '/blob/:blobHash', @@ -26,8 +33,10 @@ }, }); -const config = { - url: 'https://blob.commtechnologies.org', +const config: BlobServiceConfig = { + url: isDev + ? 'https://blob.staging.commtechnologies.org' + : 'https://blob.commtechnologies.org', httpEndpoints, };