summaryrefslogtreecommitdiff
path: root/src/albums.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/albums.js')
-rw-r--r--src/albums.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/albums.js b/src/albums.js
index 5628e6d..e10dd54 100644
--- a/src/albums.js
+++ b/src/albums.js
@@ -1,4 +1,4 @@
-import immichConnector from "./immich.js"
+import apiConnector from "./connector.js"
export default async function initAlbums(albumsPageContainer) {
// TODO empty cells animation
@@ -8,7 +8,7 @@ export default async function initAlbums(albumsPageContainer) {
async function createAlbum(res) {
console.log(res.albumName, res.id, res.startDate, res.endDate, res.assetCount, res.shared)
const albumClone = albumTemplate.content.cloneNode(true)
- albumClone.querySelector(".album-thumb").src = await immichConnector.fetchImageSrc(res.albumThumbnailAssetId)
+ albumClone.querySelector(".album-thumb").src = apiConnector.albumThumbSrc(res.albumThumbnailAssetId)
albumClone.querySelector(".album-name").textContent = res.albumName
albumClone.querySelector(".album-assets-count").textContent = res.assetCount.toLocaleString()
if (!res.shared)
@@ -17,7 +17,7 @@ export default async function initAlbums(albumsPageContainer) {
albumsContainer.appendChild(albumClone)
}
- const albumsResponse = await immichConnector.fetchAlbums()
+ const albumsResponse = await apiConnector.fetchAlbums()
for (const res of albumsResponse)
createAlbum(res)