fix: unwrap double-nested article response in GET /api/article/:sku

This commit is contained in:
seb
2026-08-03 08:38:26 +02:00
parent a3f8ff0e93
commit bfcb073e32

View File

@@ -308,7 +308,7 @@ export function register(app, basePath = '') {
} }
try { try {
const article = await db.getBySku(req.user.id, decodeURIComponent(sku)); const { article } = await db.getBySku(req.user.id, decodeURIComponent(sku));
res.status(200).json({ article }); res.status(200).json({ article });
} catch (error) { } catch (error) {
const status = articleErrorStatus(error); const status = articleErrorStatus(error);