chore: final touch

This commit is contained in:
thorwebdev committed 2022-11-30 11:53:21 +08:00
1 parent 94a31081ca
commit 011ba3af84
1 file changed
+2 -2
@@ -28,7 +28,7 @@ export async function handler(req: Request) {
try {
// Try to get image from Supabase Storage CDN.
const storageResponse = await fetch(`${STORAGE_URL}/tickets/${username}.png?version=dev`) // TODO change for prod.
const storageResponse = await fetch(`${STORAGE_URL}/tickets/${username}.png?v=3`)
if (storageResponse.ok) return storageResponse
// Else, generate image ad upload to storage.
@@ -207,7 +207,7 @@ export async function handler(req: Request) {
const { error } = await supabaseAdminClient.storage
.from('images')
.upload(`lw6/tickets/${username}.png`, generatedImage.body!, {
// cacheControl: '31536000', // TODO add for prod
cacheControl: '31536000',
upsert: false,
})
if (error) throw error