File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export async function fileDownloadInfo(
50
50
const resp = await ( params . fetch ?? fetch ) ( url , {
51
51
method : "GET" ,
52
52
headers : {
53
- ...( params . credentials && {
53
+ ...( accessToken && {
54
54
Authorization : `Bearer ${ accessToken } ` ,
55
55
} ) ,
56
56
Range : "bytes=0-0" ,
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export async function* listDatasets<
86
86
const res : Response = await ( params ?. fetch ?? fetch ) ( url , {
87
87
headers : {
88
88
accept : "application/json" ,
89
- ...( params ?. credentials ? { Authorization : `Bearer ${ accessToken } ` } : undefined ) ,
89
+ ...( accessToken ? { Authorization : `Bearer ${ accessToken } ` } : undefined ) ,
90
90
} ,
91
91
} ) ;
92
92
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export async function* listModels<
94
94
const res : Response = await ( params ?. fetch ?? fetch ) ( url , {
95
95
headers : {
96
96
accept : "application/json" ,
97
- ...( params ?. credentials ? { Authorization : `Bearer ${ accessToken } ` } : undefined ) ,
97
+ ...( accessToken ? { Authorization : `Bearer ${ accessToken } ` } : undefined ) ,
98
98
} ,
99
99
} ) ;
100
100
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export async function* listSpaces<
82
82
const res : Response = await ( params ?. fetch ?? fetch ) ( url , {
83
83
headers : {
84
84
accept : "application/json" ,
85
- ...( params ?. credentials ? { Authorization : `Bearer ${ accessToken } ` } : undefined ) ,
85
+ ...( accessToken ? { Authorization : `Bearer ${ accessToken } ` } : undefined ) ,
86
86
} ,
87
87
} ) ;
88
88
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export async function pathsInfo(
86
86
const resp = await ( params . fetch ?? fetch ) ( url , {
87
87
method : "POST" ,
88
88
headers : {
89
- ...( params . credentials && {
89
+ ...( accessToken && {
90
90
Authorization : `Bearer ${ accessToken } ` ,
91
91
} ) ,
92
92
Accept : "application/json" ,
You can’t perform that action at this time.
0 commit comments