fix: unwrap double-nested article response in GET /api/article/:sku
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user