mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 11:25:17 +00:00
Handle display JSON API version support
This commit is contained in:
parent
348428132c
commit
3d0f801b3a
@ -123,6 +123,15 @@ module.exports = {
|
||||
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);
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user