feat: move images to b2 and route through bunny

This commit is contained in:
Cory Dransfeldt 2024-07-10 08:57:00 -07:00
parent cb2d536189
commit 6a338ceb92
No known key found for this signature in database
32 changed files with 322 additions and 375 deletions

View file

@ -28,7 +28,7 @@ async function fetchAllBooks() {
while (true) {
const { data, error } = await supabase
.from('books')
.select('*')
.select(`*, art(filename_disk)`)
.range(from, to)
if (error) {
@ -60,7 +60,7 @@ export default async function () {
review: book['review'],
rating: book['star_rating'] !== 'unrated' ? book['star_rating'] : '',
description: book['description'],
image: book['thumbnail'],
image: `/${book?.['art']?.['filename_disk']}`,
url: `/books/${book['isbn']}`,
date: book['date_finished'],
status: book['read_status'],