File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -197,18 +197,20 @@ export class DatasetClient<
197
197
198
198
const dataset = await this . get ( ) ;
199
199
200
+ const { expiresInSecs, ...queryOptions } = options ;
201
+
200
202
let createdItemsPublicUrl = new URL ( this . _url ( 'items' ) ) ;
201
203
202
204
if ( dataset ?. urlSigningSecretKey ) {
203
205
const signature = createStorageContentSignature ( {
204
206
resourceId : dataset . id ,
205
207
urlSigningSecretKey : dataset . urlSigningSecretKey ,
206
- expiresInMillis : options . expiresInSecs ? options . expiresInSecs * 1000 : undefined ,
208
+ expiresInMillis : expiresInSecs ? expiresInSecs * 1000 : undefined ,
207
209
} ) ;
208
210
createdItemsPublicUrl . searchParams . set ( 'signature' , signature ) ;
209
211
}
210
212
211
- createdItemsPublicUrl = applyQueryParamsToUrl ( createdItemsPublicUrl , options ) ;
213
+ createdItemsPublicUrl = applyQueryParamsToUrl ( createdItemsPublicUrl , queryOptions ) ;
212
214
213
215
return createdItemsPublicUrl . toString ( ) ;
214
216
}
Original file line number Diff line number Diff line change @@ -132,18 +132,20 @@ export class KeyValueStoreClient extends ResourceClient {
132
132
133
133
const store = await this . get ( ) ;
134
134
135
+ const { expiresInSecs, ...queryOptions } = options ;
136
+
135
137
let createdPublicKeysUrl = new URL ( this . _url ( 'keys' ) ) ;
136
138
137
139
if ( store ?. urlSigningSecretKey ) {
138
140
const signature = createStorageContentSignature ( {
139
141
resourceId : store . id ,
140
142
urlSigningSecretKey : store . urlSigningSecretKey ,
141
- expiresInMillis : options . expiresInSecs ? options . expiresInSecs * 1000 : undefined ,
143
+ expiresInMillis : expiresInSecs ? expiresInSecs * 1000 : undefined ,
142
144
} ) ;
143
145
createdPublicKeysUrl . searchParams . set ( 'signature' , signature ) ;
144
146
}
145
147
146
- createdPublicKeysUrl = applyQueryParamsToUrl ( createdPublicKeysUrl , options ) ;
148
+ createdPublicKeysUrl = applyQueryParamsToUrl ( createdPublicKeysUrl , queryOptions ) ;
147
149
148
150
return createdPublicKeysUrl . toString ( ) ;
149
151
}
You can’t perform that action at this time.
0 commit comments