ForestAdmin/lumber

View on GitHub
serializers/project.js

Summary

Maintainability
A
0 mins
Test Coverage
D
66%
const JSONAPISerializer = require('jsonapi-serializer').Serializer;

function Project(data) {
  return new JSONAPISerializer('projects', {
    attributes: ['name'],
    keyForAttribute: 'underscore_case',
  }).serialize(data);
}

module.exports = Project;