fix: image upload returns correct data structure for all editors
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user