mirror of
https://github.com/strapi/strapi.git
synced 2025-11-08 14:19:40 +00:00
Handle display JSON API version support
This commit is contained in:
parent
348428132c
commit
3d0f801b3a
@ -123,6 +123,15 @@ module.exports = {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Display JSON API version support
|
||||||
|
if (_.isPlainObject(strapi.config.jsonapi) && strapi.config.jsonapi.hasOwnProperty('showVersion') && strapi.config.jsonapi.showVersion === true) {
|
||||||
|
return _.assign(new JSONAPISerializer(type, value, toSerialize), {
|
||||||
|
jsonapi: {
|
||||||
|
version: '1.0'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return new JSONAPISerializer(type, value, toSerialize);
|
return new JSONAPISerializer(type, value, toSerialize);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user