refactor(web): shared link key auth (#3855)

This commit is contained in:
Jason Rasmussen 2023-08-25 00:03:28 -04:00 committed by GitHub
parent 10c2bda3a9
commit 9bbef4a97b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 115 additions and 108 deletions

View file

@ -58,7 +58,10 @@ export class AssetStore {
this.assetToBucket = {};
this.albumAssets = new Set();
const { data: buckets } = await api.assetApi.getTimeBuckets(this.options);
const { data: buckets } = await api.assetApi.getTimeBuckets({
...this.options,
key: api.getKey(),
});
this.buckets = buckets.map((bucket) => {
const unwrappedWidth = (3 / 2) * bucket.count * THUMBNAIL_HEIGHT * (7 / 10);
@ -107,7 +110,11 @@ export class AssetStore {
bucket.cancelToken = new AbortController();
const { data: assets } = await api.assetApi.getByTimeBucket(
{ ...this.options, timeBucket: bucketDate },
{
...this.options,
timeBucket: bucketDate,
key: api.getKey(),
},
{ signal: bucket.cancelToken.signal },
);
@ -117,7 +124,7 @@ export class AssetStore {
albumId: this.albumId,
timeBucket: bucketDate,
size: this.options.size,
key: this.options.key,
key: api.getKey(),
},
{ signal: bucket.cancelToken.signal },
);