New Response Type

This commit is contained in:
Deepak Dahiya authored and GitHub committed 2022-03-31 09:42:59 +00:00
1 parent cd441954ec
commit 2f2e0dc2cc
5 files changed
+28 -10

No files matched your search

+4 -2
View File
@@ -13,7 +13,8 @@ import {
InternalCacheOptions,
CommitCacheRequest,
ReserveCacheRequest,
ReserveCacheResponse
ReserveCacheResponse,
ITypedResponseWithErrorMessage
} from './contracts'
import {downloadCacheHttpClient, downloadCacheStorageSDK} from './downloadUtils'
import {
@@ -143,7 +144,7 @@ export async function reserveCache(
key: string,
paths: string[],
options?: InternalCacheOptions
): Promise<ITypedResponse<ReserveCacheResponse>> {
): Promise<ITypedResponseWithErrorMessage<ReserveCacheResponse>> {
const httpClient = createHttpClient()
const version = getCacheVersion(paths, options?.compressionMethod)
@@ -158,6 +159,7 @@ export async function reserveCache(
reserveCacheRequest
)
)
console.log(response)
return response
}