fix: image upload returns correct data structure for all editors

This commit is contained in:
2026-06-28 23:18:27 -05:00
parent 6b0db0e3cf
commit abf46b9075
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ export async function POST(request: NextRequest) {
[filename, data, category || 'other', room_id || null, location_target || 'gallery']
);
return NextResponse.json({ image: rows[0] });
return NextResponse.json({ data: rows[0] });
} catch (error) {
if ((error as Error).message === 'Unauthorized') {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });