smocks
smocks copied to clipboard
Documentation wrong about api variant set
Check documentation:
set an active route variant POST to {host}:{port}/_admin/api/route/{routeId}/variant/{variantId}
It's wrong.
Working example:
fetch('/_admin/api/route/{routeId}', {
method: 'POST',
body: JSON.stringify({
variant: 'my-variant'
})
})
thanks for the feedback. I should probably review all the docs for accuracy.