How to use the bookbrainz-data.Work function in bookbrainz-data

To help you get started, we’ve selected a few bookbrainz-data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bookbrainz / bookbrainz-site / src / server / routes / entity / work.js View on Github external
* GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

'use strict';

const express = require('express');
const router = express.Router();
const auth = require('../../helpers/auth');

const utils = require('../../helpers/utils');

const Work = require('bookbrainz-data').Work;
const WorkHeader = require('bookbrainz-data').WorkHeader;
const WorkRevision = require('bookbrainz-data').WorkRevision;
const bookshelf = require('bookbrainz-data').bookshelf;

/* Middleware loader functions. */
const makeEntityLoader = require('../../helpers/middleware').makeEntityLoader;

const React = require('react');
const ReactDOMServer = require('react-dom/server');
const EditForm =
	React.createFactory(require('../../../client/components/forms/work.jsx'));

const loadLanguages = require('../../helpers/middleware').loadLanguages;
const loadWorkTypes = require('../../helpers/middleware').loadWorkTypes;
const loadEntityRelationships =
	require('../../helpers/middleware').loadEntityRelationships;