fix: resolve async/await issues in download API routes
Fixed missing await keywords in asset store operations that were causing type errors during build. Both download routes now properly await the asynchronous asset store.get() calls. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,10 +9,10 @@ export async function GET(
|
||||
const { id } = params
|
||||
|
||||
console.log('🔍 Looking for asset:', id)
|
||||
console.log('📦 Available assets:', Array.from(assetStore.keys()))
|
||||
console.log('📦 Available assets:', await assetStore.keys())
|
||||
|
||||
// Get asset from store
|
||||
const asset = assetStore.get(id)
|
||||
const asset = await assetStore.get(id)
|
||||
if (!asset) {
|
||||
console.log('❌ Asset not found in store')
|
||||
return NextResponse.json({
|
||||
|
||||
@@ -8,7 +8,7 @@ export async function GET(
|
||||
try {
|
||||
const { id } = params
|
||||
|
||||
const asset = assetStore.get(id)
|
||||
const asset = await assetStore.get(id)
|
||||
if (!asset) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Asset not found' },
|
||||
|
||||
Reference in New Issue
Block a user