xiaohutai / jsonapi

[Bolt Extension] JSON API for Bolt CMS
https://market.bolt.cm/view/bolt/jsonapi
MIT License
55 stars 18 forks source link

/{ct}/{id} and /{ct}/{slug} #31

Closed imonly closed 8 years ago

imonly commented 8 years ago

../json/pages/about return "No [pages] found with id/slug: [about]."

Please add in SingleAction

if($slug>0) {
    $queryParameters = array_merge($parameters->getQueryParameters(), ['returnsingle' => true, 'id' => $slug]);
} else {
    $queryParameters = array_merge($parameters->getQueryParameters(), ['returnsingle' => true, 'slug' => $slug]);
}

for checking slug

Raistlfiren commented 8 years ago

Thanks @imonly. Please test 3.0.6, and see if that works for you. Cheers m8!