File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ function createMockFetch(args: { write: boolean }): {
157157 const url = typeof input === "string" ? input : input . toString ( ) ;
158158
159159 // Mock successful responses for xorb and shard uploads
160- if ( url . includes ( "/xorb /" ) ) {
160+ if ( url . includes ( "/xorbs /" ) ) {
161161 xorbCount ++ ;
162162 const bodySize = getBodySize ( init ?. body ) ;
163163 xorbBytes += parseInt ( bodySize ) ;
@@ -174,7 +174,7 @@ function createMockFetch(args: { write: boolean }): {
174174 } ) ;
175175 }
176176
177- if ( url . endsWith ( "/shard " ) ) {
177+ if ( url . endsWith ( "/shards " ) ) {
178178 shardCount ++ ;
179179 const bodySize = getBodySize ( init ?. body ) ;
180180 shardBytes += parseInt ( bodySize ) ;
Original file line number Diff line number Diff line change @@ -159,10 +159,10 @@ export class XetBlob extends Blob {
159159 const connParams = await getAccessToken ( this . accessToken , this . fetch , this . refreshUrl ) ;
160160
161161 // debug(
162- // `curl '${connParams.casUrl}/v1/reconstruction /${this.hash}' -H 'Authorization: Bearer ${connParams.accessToken}'`
162+ // `curl '${connParams.casUrl}/v1/reconstructions /${this.hash}' -H 'Authorization: Bearer ${connParams.accessToken}'`
163163 // );
164164
165- const resp = await this . fetch ( this . reconstructionUrl ?? `${ connParams . casUrl } /v1/reconstruction /${ this . hash } ` , {
165+ const resp = await this . fetch ( this . reconstructionUrl ?? `${ connParams . casUrl } /v1/reconstructions /${ this . hash } ` , {
166166 headers : {
167167 Authorization : `Bearer ${ connParams . accessToken } ` ,
168168 Range : `bytes=${ this . start } -${ this . end - 1 } ` ,
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ export async function* createXorbs(
202202 const token = await xetWriteToken ( params ) ;
203203 bytesSinceRemoteDedup = 0 ;
204204
205- const shardResp = await ( params . fetch ?? fetch ) ( token . casUrl + "/v1/chunk /default/" + chunk . hash , {
205+ const shardResp = await ( params . fetch ?? fetch ) ( token . casUrl + "/v1/chunks /default/" + chunk . hash , {
206206 headers : {
207207 Authorization : `Bearer ${ token . accessToken } ` ,
208208 } ,
@@ -683,7 +683,7 @@ async function loadDedupInfoToCache(
683683 const token = await xetWriteToken ( params ) ;
684684 bytesSinceRemoteDedup = 0 ;
685685
686- const shardResp = await ( params . fetch ?? fetch ) ( token . casUrl + "/v1/chunk /default/" + chunk . hash , {
686+ const shardResp = await ( params . fetch ?? fetch ) ( token . casUrl + "/v1/chunks /default/" + chunk . hash , {
687687 headers : {
688688 Authorization : `Bearer ${ token . accessToken } ` ,
689689 } ,
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ async function uploadXorb(
359359) {
360360 const token = await xetWriteToken ( params ) ;
361361
362- const resp = await ( params . fetch ?? fetch ) ( `${ token . casUrl } /v1/xorb /default/${ xorb . hash } ` , {
362+ const resp = await ( params . fetch ?? fetch ) ( `${ token . casUrl } /v1/xorbs /default/${ xorb . hash } ` , {
363363 method : "POST" ,
364364 body : xorb . xorb ,
365365 headers : {
@@ -388,7 +388,7 @@ async function uploadXorb(
388388async function uploadShard ( shard : Uint8Array , params : UploadShardsParams ) {
389389 const token = await xetWriteToken ( params ) ;
390390
391- const resp = await ( params . fetch ?? fetch ) ( `${ token . casUrl } /v1/shard ` , {
391+ const resp = await ( params . fetch ?? fetch ) ( `${ token . casUrl } /v1/shards ` , {
392392 method : "POST" ,
393393 body : shard ,
394394 headers : {
You can’t perform that action at this time.
0 commit comments