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 {
|
||||
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 });
|
||||
} catch (error) {
|
||||
const status = articleErrorStatus(error);
|
||||
|
||||
Reference in New Issue
Block a user