fix(mcp-server): jarvis.marketplace.certify routes to wrong endpoint on rejection
The backend has two separate endpoints:
POST /marketplace/admin/:id/approve
POST /marketplace/admin/:id/reject
Previously jarvisMarketplaceCertify always called /approve regardless of
the decision field — rejections would silently approve listings.
Fix: derive action from decision.decision ('approved' → 'approve', else 'reject')
and use the correct endpoint path.
This commit is contained in:
parent
f70001de74
commit
5a3987bd9f
@ -194,8 +194,9 @@ export function jarvisMarketplaceCertify(
|
||||
decision: { decision: 'approved' | 'rejected'; notes?: string },
|
||||
opts: JarvisClientOptions
|
||||
): Promise<unknown> {
|
||||
const action = decision.decision === 'approved' ? 'approve' : 'reject';
|
||||
return jarvisFetch(
|
||||
`/marketplace/admin/${listingId}/approve`,
|
||||
`/marketplace/admin/${listingId}/${action}`,
|
||||
{ method: 'POST', body: JSON.stringify(decision) },
|
||||
opts
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user